[cairo-bugs] [Bug 75635] New: clang warnings about comparing enum _cairo_status and enum _cairo_int_status types

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 28 23:34:49 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=75635

          Priority: medium
            Bug ID: 75635
          Assignee: chris at chris-wilson.co.uk
           Summary: clang warnings about comparing enum _cairo_status and
                    enum _cairo_int_status types
        QA Contact: cairo-bugs at cairographics.org
          Severity: normal
    Classification: Unclassified
                OS: Mac OS X (All)
          Reporter: cpeterson at mozilla.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: cairo

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

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140301/f27852a2/attachment.html>


More information about the cairo-bugs mailing list