On Thu, 2007-11-08 at 16:44 +0100, Robert Schuster wrote: > Now if HAVE_STATVFS is not defined the compiler is correct mourning that > 'path' and 'type' are not used. I have seen code (in classpath) where > this issue is solved this way: > > JNIEXPORT long long > cpio_df (const char *path, CPFILE_DF_TYPE type) > { > long long result = 0L; > > #if defined(HAVE_STATVFS) > > ... much stuff > #else > > (void) path; > (void) type; > > #endif > > return result; > } > > See Java_gnu_java_nio_KqueueSelectorImpl_kevent_1set for example.
Yes, right. I've also fixed similar problems a while ago and we decided to use the unused attribute. - twisti