[Dune] [#951] Fix warning: unused parameter
Dune
flyspray at dune-project.org
Thu Sep 15 15:25:27 CEST 2011
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#951 - Fix warning: unused parameter
User who did this - Christian Engwer (christi)
----------
I agree with Markus, that we want to document the parameters. I see two possible ways:
1) use the void cast
... kind of ugly, but it works
... might be made a bit more readable with the "#define UNUSED_ARGUMENT(x) (void)x", as suggested on the webpage Markus mentioned.
2) use something like
void foo(int UNUSED_ARG(bar))
where UNUSED_ARG might be defined to different things, when compiling, or when using doxygen.
For doxygen we would define something like "#define UNUSED_ARG(x) x",
whereas the normal dune code would contain a definition like "#define UNUSED_ARGUMENT(x)"
or "#define UNUSED_ARG(x) UNUSED_ ## x __attribute__((unused))" if attribute unused is supported.
----------
More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=951#comment2687
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the Dune
mailing list