compile warnings with harfbuzz

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: vlad, Assigned: jfkthame)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 obsolete attachment)

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
(Assignee)

Comment 1

7 years ago
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.)
Assignee: nobody → jfkthame
Attachment #481233 - Flags: review?(vladimir)
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 :)
Attachment #481233 - Flags: review?(vladimir) → review+

Updated

6 years ago
Whiteboard: [build_warning]

Updated

6 years ago
Blocks: 187528

Comment 3

6 years ago
Happy for me to land this? (after unrotting)
(Assignee)

Comment 4

6 years ago
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)?
(Assignee)

Comment 5

6 years ago
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.
Attachment #481233 - Attachment is obsolete: true
Closing command per Comment 5, re-open if there are still warnings we want to take a patch for.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.