diff --git a/lily/engraver.cc b/lily/engraver.cc
index b8bf123..dfd2c21 100644
--- a/lily/engraver.cc
+++ b/lily/engraver.cc
@@ -105,20 +105,21 @@ LY_DEFINE (ly_set_grob_creation_callback,
"ly:set-grob-creation-callback",

 Grob *
 Engraver::internal_make_grob (SCM symbol,
                               SCM cause,
                               char const * /* name */,
                               char const *file,
                               int line,
                               char const *fun)
 {
 #ifdef NDEBUG
+    /// WTF??
   (void)file;
   (void)line;
   (void)fun;
 #endif

file, line and fun are used only in debug mode. Therefore in release
mode, the compiler will issue a warning (unused variables). The proper
way to remove the warning is to remove the name of the unused
variables as done with 'name' but then the code won't compile in debug
mode... These lines are skipped by the compiler and the warning
disappears.

Personnaly, I prefer the following solution:
#ifdef NDEBUG
 Engraver::internal_make_grob (SCM symbol,
                               SCM cause,
                               char const * /* name */,
                               char const * /* file */,
                               int /* line */,
                               char const * /* fun */)
#else
 Engraver::internal_make_grob (SCM symbol,
                               SCM cause,
                               char const * /* name */,
                               char const *file,
                               int line,
                               char const *fun)
#endif

but it takes more lines...

Frédéric

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to