Last Comment Bug 776077 - Hundreds of -Wconversion warnings in cairo for "implicit conversion from enumeration type 'cairo_status_t'" and related
: Hundreds of -Wconversion warnings in cairo for "implicit conversion from enum...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Gregory Szorc [:gps]
:
Mentors:
Depends on:
Blocks: clang
  Show dependency treegraph
 
Reported: 2012-07-20 13:11 PDT by Gregory Szorc [:gps]
Modified: 2012-08-21 06:29 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Disable -Wconversion warnings in cairo, v1 (994 bytes, patch)
2012-08-20 11:39 PDT, Gregory Szorc [:gps]
jmuizelaar: review+
Details | Diff | Splinter Review

Description Gregory Szorc [:gps] 2012-07-20 13:11:06 PDT
Nearly half of our existing Clang warnings (375 on my last build) are -Wconversion warnings in cairo that look like this:

gfx/cairo/cairo/src/cairo-quartz-surface.c:2710:9 [-Wconversion] implicit conversion from enumeration type 'enum _cairo_status' to different enumeration type 'cairo_int_status_t' (aka 'enum _cairo_int_status')
gfx/cairo/cairo/src/cairo-quartz-surface.c:2715:10 [-Wconversion] implicit conversion from enumeration type 'cairo_status_t' (aka 'enum _cairo_status') to different enumeration type 'cairo_int_status_t' (aka 'enum _cairo_int_status')

These account for 375 of the 380 warnings in gfx/cairo and 375 of the 489 warnings in gfx/. There are 812 total compiler warnings in the tree when building Firefox. So, this is the largest single batch of related warnings in the code base.
Comment 1 Jeff Muizelaar [:jrmuizel] 2012-07-20 14:41:54 PDT
I don't know a good way to fix this problem. It might be best to just disable this warning for the cairo directory.
Comment 2 Gregory Szorc [:gps] 2012-08-20 11:39:43 PDT
Created attachment 653454 [details] [diff] [review]
Disable -Wconversion warnings in cairo, v1

Not my preferred solution (actually fixing the warnings), but better than nothing.

Try at https://tbpl.mozilla.org/?tree=Try&rev=9638877dac55
Comment 4 Ed Morley [:emorley] 2012-08-21 06:29:52 PDT
https://hg.mozilla.org/mozilla-central/rev/55b7ad1fd651

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