[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tie Crusade - what to do now
From: |
Frédéric Bron |
Subject: |
Re: Tie Crusade - what to do now |
Date: |
Tue, 20 Aug 2013 06:57:57 +0200 |
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