To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=66577 Issue #:|66577 Summary:|gcc 4.0.2 build fails due to "warnings are errors" Component:|porting Version:|680 Platform:|All URL:| OS/Version:|All Status:|NEW Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|code Assigned to:|sb Reported by:|sb
------- Additional comments from [EMAIL PROTECTED] Tue Jun 20 00:26:52 -0700 2006 ------- Now that CWS warnings01 is integrated into SRC680m173, in many CVS modules C/C++ compiler warnings are now treated as errors that break the build. Unfortunately, CWS warnings01 used gcc 3.4.1 to make the code warning-free, but other gcc versions like gcc 4.0.2 produce slightly more warnings and thus the build breaks when using such a gcc version. This problem somehow escaped me until yesterday evening, when I started a "pure" OOo build (not from within the Hamburg build environment) of CWS warnings01 on unxlngi6.pro. I found the time to build up into i18npool (i.e., covering about half of all the CVS modules), changing 30 files along the way (plus merging in boost/spirit-1.6.1.patch:1.3.28.1 to be able to build at all with gcc 4.0.2; I used a plain configure with any additional switches). The attached diff (against cws_src680_warnings01, and not yet against SRC680_m172 where CWS warnings01 will be integrated) shows that allmost all changes fell into one of a few categories: - Cases where gcc cannot deduce that a variable has been assigned a value, as in sal_Bool bBoolVal; if (aValue >>= bBoolVal) [configmgr/source/api2/providerimpl.cxx] (Interestingly, the warning appears to only be emitted for byte-sized types like sal_Bool and sal_Int8.) - Cases where a variable is used and modified in the same expression, as in ( pDate[17 + gab] - 0x30 ) * 10 + (pDate[17+ ++gab]-0x30 [hwpfilter/source/hwpreader.cxx] - Cases where printf-style functions are called with arguments that do not match the % specifications, as in fprintf(stdout, " Field %d: Value1 = %d != Value2 = %d\n", index1, constValue1.m_value.aFloat, constValue2.m_value.aFloat); [registry/tools/regcompare.cxx] - Expressions that do not have any effect, as in for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); i++, cModule) [jvmfwk/source/framework.cxx] - Cases where an assignment within an if expression is not enclosed in an extra set of parantheses, as in if ( ret = pTmpReg->mergeKey(rootKey, aRoot, convertToFileUrl( *iter )) ) [rdbmaker/source/codemaker/typemanager.cxx] (I would have thought that this had been already been detected, on at least one of the compiler platforms we covered---strange.) I do not know when I will find time to continue the build and find the remaining breaks. If someone is willing to help me, that would be great. And I apologize in advance for any trouble this will cause once SRC680m173 is out... --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]