Apache OpenOffice (AOO) Bugzilla – Issue 113731
OOO330_m3: vcl/source/glyphs/graphite_layout.cxx:1061: warning: converting negative value '-0x000000001' to 'unsigned int'
Last modified: 2010-09-07 11:58:00 UTC
Entering /home/oo/BuildDir/ooo_OOO330_m3_src/vcl/source/glyphs Compiling: vcl/source/glyphs/graphite_layout.cxx cc1plus: warnings being treated as errors /home/oo/BuildDir/ooo_OOO330_m3_src/vcl/source/glyphs/graphite_layout.cxx: In member function 'virtual void GraphiteLayout::ApplyDXArray(ImplLayoutArgs&, _STL::vector<int, _STL::allocator<int> >&)': /home/oo/BuildDir/ooo_OOO330_m3_src/vcl/source/glyphs/graphite_layout.cxx:1061: warning: converting negative value '-0x000000001' to 'unsigned int' dmake: Error code 1, while making '../../unxlngi6.pro/slo/graphite_layout.obj' oo@octopus:~/BuildDir/ooo_OOO330_m3_src/vcl>
This is not new and probably very old one. I "fixed" this by - int nPrevClusterGlyph = (bRtl)? mvGlyphs.size() : -1; + int nPrevClusterGlyph = -1; + + if (bRtl) + nPrevClusterGlyph = mvGlyphs.size(); + Probably bug in gcc version 4.0.2 20050901 (prerelease) (SUSE Linux).
Fine with me... Since that gcc version seems to be so an** about sign conversions I'd prefer - int nPrevClusterGlyph = (bRtl)? mvGlyphs.size() : -1; + int nPrevClusterGlyph = (bRtl)? (int)mvGlyphs.size() : -1; to make the signedness-conversion explicitly which about every other compiler does implicitly.
Yes, casting explicitly to an int looks like a good solution. I would be happy with that.
Applied as compile fix to CWS graphite04.
@pjanik: please verify in CWS graphite04 http://hg.services.openoffice.org/cws/graphite04/rev/7e9ce33f2cb9
Compiles OK, thanks!
Got into OOO330_m5 => closing