Issue 31791 - convertsinglebytetobmpunicode.cxx: crosses initialization of `size_t i'
Summary: convertsinglebytetobmpunicode.cxx: crosses initialization of `size_t i'
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: PC FreeBSD
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: pavel
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-20 18:10 UTC by pavel
Modified: 2004-11-29 10:43 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Take the declaration out of the loop (873 bytes, patch)
2004-07-20 18:13 UTC, pavel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2004-07-20 18:10:04 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.
Comment 1 pavel 2004-07-20 18:13:24 UTC
Created attachment 16630 [details]
Take the declaration out of the loop
Comment 2 pavel 2004-07-20 18:13:45 UTC
set target to 2.0, accept
Comment 3 pavel 2004-07-21 09:28:29 UTC
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.
Comment 4 pavel 2004-07-21 09:29:02 UTC
The same applies to Mac OS X.
Comment 5 pavel 2004-07-28 08:19:55 UTC
-fno-for-scope removed for FreeBSD and Mac OS X in cws_src680_ooo20040815.
Comment 6 pavel 2004-11-29 10:43:45 UTC
verified, closing.