Apache OpenOffice (AOO) Bugzilla – Issue 31791
convertsinglebytetobmpunicode.cxx: crosses initialization of `size_t i'
Last modified: 2004-11-29 10:43:45 UTC
While compiling 20040704 on FreeBSD with gcc version 3.3.4 20040308 (prerelease) [FreeBSD] /home/pavel/BuildDir/ooo_cws_src680_ooo20040704_src/sal/textenc/convertsinglebytetobmpunicode.cxx: In function `sal_Size rtl_textenc_convertBmpUnicodeToSingleByte(const ImplTextConverterData*, void*, const sal_Unicode*, long unsigned int, sal_Char*, long unsigned int, long unsigned int, sal_uInt32*, sal_Size*)': /home/pavel/BuildDir/ooo_cws_src680_ooo20040704_src/sal/textenc/convertsinglebytetobmpunicode.cxx:167: error: crosses initialization of `size_t i' /home/pavel/BuildDir/ooo_cws_src680_ooo20040704_src/sal/textenc/convertsinglebytetobmpunicode.cxx:167: error: crosses initialization of `size_t i' The attached patch fixes it.
Created attachment 16630 [details] Take the declaration out of the loop
set target to 2.0, accept
As Stephan Bergmann wrote on dev@porting, this is because of no-for-scope option of gcc is turned on. Test if removing it helps instead of patching.
The same applies to Mac OS X.
-fno-for-scope removed for FreeBSD and Mac OS X in cws_src680_ooo20040815.
verified, closing.