Last Comment Bug 602044 - compile warnings with harfbuzz
: compile warnings with harfbuzz
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86 Windows 7
: -- normal (vote)
: ---
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on:
Blocks: buildwarning
  Show dependency treegraph
 
Reported: 2010-10-05 13:46 PDT by Vladimir Vukicevic [:vlad] [:vladv]
Modified: 2012-01-27 13:32 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch, v1 - add typecasts etc to avoid compiler warnings (7.80 KB, patch)
2010-10-06 08:47 PDT, Jonathan Kew (:jfkthame)
vladimir: review+
Details | Diff | Review

Description Vladimir Vukicevic [:vlad] [:vladv] 2010-10-05 13:46:16 PDT
building with vs2010:

c:\proj\firefox\dist\include\harfbuzz\hb-common.h(34) : Warning Msg: Not using stdint.h; integer types may have wrong size
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(216) : warning C4018: '>=' : signed/unsigned mismatch
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(227) : warning C4244: '=' : conversion from 'float' to 'hb_position_t', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(633) : warning C4244: 'return' : conversion from 'float' to 'hb_position_t', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(798) : warning C4244: 'argument' : conversion from 'gfxFloat' to 'unsigned
int', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(798) : warning C4244: 'argument' : conversion from 'gfxFloat' to 'unsigned
int', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(799) : warning C4244: 'initializing' : conversion from 'gfxFloat' to 'PRUint32', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(900) : warning C4018: '<' : signed/unsigned mismatch
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(909) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(983) : warning C4018: '<' : signed/unsigned mismatch
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(990) : warning C4018: '>=' : signed/unsigned mismatch
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(996) : warning C4018: '<' : signed/unsigned mismatch
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(1012) : warning C4244: 'initializing' : conversion from 'float' to 'nscoord', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(1039) : warning C4244: '-=' : conversion from 'float' to 'nscoord', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(1044) : warning C4244: '=' : conversion from 'float' to 'nscoord', possible loss of data
c:/proj/firefox/gfx/thebes/../../../mozilla-central/gfx/thebes/gfxHarfBuzzShaper.cpp(1058) : warning C4018: '<' : signed/unsigned mismatch
Comment 1 Jonathan Kew (:jfkthame) 2010-10-06 08:47:47 PDT
Created attachment 481233 [details] [diff] [review]
patch, v1 - add typecasts etc to avoid compiler warnings

This should fix the warnings, except for the one about "hb-common.h(34) : Warning Msg: Not using stdint.h; integer types may have wrong size." This is an intentional message to warn us that the code is using a collection of hard-coded typedefs for [u]int*_t types, as the standard <stdint.h> header isn't available in MSVC. (It is explicitly printed using #pragma message rather than being an actual compiler warning.)
Comment 2 Vladimir Vukicevic [:vlad] [:vladv] 2010-10-06 11:59:05 PDT
Comment on attachment 481233 [details] [diff] [review]
patch, v1 - add typecasts etc to avoid compiler warnings

Great, thanks!  thebes isn't exactly warning-free, but we should at least head in the right direction :)
Comment 3 Ed Morley [:emorley] 2011-08-26 17:58:28 PDT
Happy for me to land this? (after unrotting)
Comment 4 Jonathan Kew (:jfkthame) 2011-08-27 02:37:54 PDT
Hmm.... judging by the current code, it looks like the warnings here should have been fixed already through other changes - I believe bug 605043 dealt with most of them, at least.

Are there still build warnings being generated in this code (besides the known message mentioned in comment #1)?
Comment 5 Jonathan Kew (:jfkthame) 2011-08-27 02:39:47 PDT
Comment on attachment 481233 [details] [diff] [review]
patch, v1 - add typecasts etc to avoid compiler warnings

This patch is obsolete, as bug 605043 fixed (at least most of) these issues; if anything remains, we should create a new patch based on current code.
Comment 6 Benoit Girard (:BenWa) 2012-01-27 13:32:09 PST
Closing command per Comment 5, re-open if there are still warnings we want to take a patch for.

Note You need to log in before you can comment on or make changes to this bug.