There might be cases where you want to do some quick and dirty compilation of some C/C++ OOo source code with warnings suppressed. One reason might be that you work on a module that has not yet been made warning-free (e.g., sw), a source file compiles with 100 warnings and one error, and you have a hard time spotting the error information among all the warnings in the compiler's output. Another reason might be that you want to test certain aspects of a non-standard compiler without getting caught by the fact that that compiler emits new warnings and thus does not compile the code at all due to warnings=errors.

A nice little hack that allows to do this, at least on SRC680m178, is to set the environment variable ENVWARNFLAGS to some value (which prevents all of the warning-related compiler switches to be set, even the warnings=errors switch, see solenv/inc/settings.mk:1.199). You cannot set ENVWARNFLAGS to an empty value or a whitespace-only value, however, but a solution that should work on all platforms is to set it to -DNEW_SOLAR (which itself seems to be forgotten junk; many of the solenv/inc/<platform>.mk add it to the compiler command line, but there appears to be no code that actually uses it; and adding it twice to the command line, via ENVWARNFLAGS, is harmless).

But note that this is only a hack for those quick-and-dirty situations, and not an excuse to become sloppy about the warning-freeness of the OOo source code.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to