Dear Classpath-members,

after my last update of the Classpath sources I detected some parameters of functions which are unused and are marked by

__attribute__ ((__unused__)

Unfortunatelly this is not portable to some non-GNU compilers (as I know... at least I have one C-compiler for ARM which can not handle this). Can we use a macro for this? E. g.

#ifdef __GNUC__
  #define VARIABLE_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#else
  #define VARIABLE_ATTRIBUTE_UNUSED
#endif

A configure-test would also be possible instead "#ifdef __GNUC__".


Another idea would be some construct of the form

if ((parameter)==(parameter));

for each unused parameter. This would avoid a C-compiler warning for still not implemented functions and keep the prototypes clean (implemenation later will become simpler, because the header files do not change).

By,

Torsten



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to