Bug 75635 - clang warnings about comparing enum _cairo_status and enum _cairo_int_status types
Summary: clang warnings about comparing enum _cairo_status and enum _cairo_int_status ...
Status: RESOLVED INVALID
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Mac OS X (All)
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-01 07:34 UTC by Chris Peterson
Modified: 2014-03-21 05:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Chris Peterson 2014-03-01 07:34:49 UTC
I see the following clang warnings when compiling Firefox's in-tree copy of cairo. I plan to submit a patch to suppress these warnings in Firefox's build, but I wanted to report them upstream first.


cairo-analysis-surface.c:326:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN' (105) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-analysis-surface.c:432:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN' (105) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-analysis-surface.c:496:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN' (105) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-analysis-surface.c:568:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN' (105) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-analysis-surface.c:632:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-analysis-surface.c:652:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN' (105) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-clip.c:595:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-clip.c:626:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-device.c:451:50 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:1393:33 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT' (4096) with expression of type 'const cairo_surface_type_t' (aka 'const enum _cairo_surface_type') is always false
cairo-image-surface.c:1942:17 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-image-surface.c:1944:29 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:2271:23 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:2276:29 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:2916:23 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:2918:26 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:3060:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-image-surface.c:3190:29 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-image-surface.c:3672:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-paginated-surface.c:367:17 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-path-stroke.c:1407:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-quartz-surface.c:1795:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-quartz-surface.c:2048:60 [-Wincompatible-pointer-types] incompatible pointer types passing 'cairo_surface_t *' (aka 'struct _cairo_surface *') to parameter of type 'cairo_image_surface_t *' (aka 'struct _cairo_image_surface *')
cairo-scaled-font.c:1941:20 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-scaled-font.c:2226:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-scaled-font.c:2501:20 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-scaled-font.c:2855:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface-fallback.c:137:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:142:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:352:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:451:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:456:28 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:792:23 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:795:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface-fallback.c:809:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface-fallback.c:813:24 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface-fallback.c:852:25 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface-fallback.c:1279:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:173:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_NOTHING_TO_DO' (102) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:176:50 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:1773:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:1808:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:2110:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface.c:2165:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface.c:2233:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface.c:2298:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface.c:2353:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always true
cairo-surface.c:2759:13 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:2771:17 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:2786:17 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
cairo-surface.c:2807:16 [-Wtautological-constant-out-of-range-compare] comparison of constant 'CAIRO_INT_STATUS_UNSUPPORTED' (100) with expression of type 'cairo_status_t' (aka 'enum _cairo_status') is always false
Comment 1 Uli Schlachter 2014-03-01 12:16:44 UTC
Can you reproduce these warnings with a non-ancient version of cairo? If yes, please say which version you used and also provide the warnings / line numbers.

The line numbers from this report point into nowhere.
Comment 2 Chris Peterson 2014-03-21 05:03:26 UTC
Comparing Firefox's ancient cairo and cairo's master, I think most of these warnings have been fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.