Issue 113731 - OOO330_m3: vcl/source/glyphs/graphite_layout.cxx:1061: warning: converting negative value '-0x000000001' to 'unsigned int'
Summary: OOO330_m3: vcl/source/glyphs/graphite_layout.cxx:1061: warning: converting ne...
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOO330m1
Hardware: All All
: P1 (highest) Trivial (vote)
Target Milestone: OOo 3.3
Assignee: hdu@apache.org
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-08 18:46 UTC by pavel
Modified: 2010-09-07 11:58 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2010-08-08 18:46:35 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>
Comment 1 pavel 2010-08-09 06:26:43 UTC
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).
Comment 2 hdu@apache.org 2010-08-09 09:48:14 UTC
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.
Comment 3 devel 2010-08-09 10:57:27 UTC
Yes, casting explicitly to an int looks like a good solution. I would be happy
with that.
Comment 4 hdu@apache.org 2010-08-09 11:18:18 UTC
Applied as compile fix to CWS graphite04.
Comment 5 hdu@apache.org 2010-08-09 11:23:59 UTC
@pjanik: please verify in CWS graphite04
http://hg.services.openoffice.org/cws/graphite04/rev/7e9ce33f2cb9
Comment 6 pavel 2010-08-09 11:27:50 UTC
Compiles OK, thanks!
Comment 7 hdu@apache.org 2010-09-07 11:58:00 UTC
Got into OOO330_m5 => closing