Warnings review in native code

Roman Kennke roman.kennke at aicas.com
Tue Dec 9 06:19:41 PST 2008


Hi there,

(Posting here, as this affects not only a single group. Please forward
me to the correct list if this is not appropriate.)

we @aicas would like to review compiler warnings in OpenJDK's native
code, and try to remove them im feasible. So far so good. But there is
one thing that clutters up the compiler output, that is warnings related
to unused parameters. As it is not always possible (infact, it is not
possible in most cases) to simply remove parameters, be it that it's
about an unused env parameter, or stuff that has to be there to
implement a certain interface, I'd like to propose the introduction of a
small macro like

#define OPENJDK_PARAMETER_UNUSED(par) (void)(par)

(or similar) that can be put at the beginning of a function to indicate
that the parameter should indeed not be used, and make the compiler
happy (while at the same time not generating code for it).

Does that sound feasible? Maybe has a better idea how to address this?
And if it's feasible, where should it go? jni_util.h?

Thanks, Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-48
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt




More information about the jdk7-dev mailing list