After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656265 - Fix compiler warnings reported by ICC
Fix compiler warnings reported by ICC
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Mac OS
: Normal enhancement
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-10 09:58 UTC by Josep Torra Valles
Modified: 2011-08-15 20:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
warning #188: enumerated type mixed with another type (1.83 KB, patch)
2011-08-10 09:58 UTC, Josep Torra Valles
committed Details | Review
warning #188: enumerated type mixed with another type (1.68 KB, patch)
2011-08-10 10:00 UTC, Josep Torra Valles
committed Details | Review
warning #186: pointless comparison of unsigned integer (1.29 KB, patch)
2011-08-10 10:01 UTC, Josep Torra Valles
rejected Details | Review
warning #188: enumerated type mixed with another type (840 bytes, patch)
2011-08-10 10:03 UTC, Josep Torra Valles
committed Details | Review
warning #188: enumerated type mixed with another type (1.36 KB, patch)
2011-08-10 10:04 UTC, Josep Torra Valles
committed Details | Review
warning #188: enumerated type mixed with another type (2.91 KB, patch)
2011-08-10 10:04 UTC, Josep Torra Valles
committed Details | Review
warning #188: enumerated type mixed with another type (934 bytes, patch)
2011-08-10 10:04 UTC, Josep Torra Valles
committed Details | Review
warning #188: enumerated type mixed with another type (943 bytes, patch)
2011-08-10 10:05 UTC, Josep Torra Valles
committed Details | Review

Description Josep Torra Valles 2011-08-10 09:58:39 UTC
Created attachment 193519 [details] [review]
warning #188: enumerated type mixed with another type

I've tried to build core with ICC in OSX and wrote the following patches to tame a little the warning reporting.

Please provide me feedback on them before I go for more like this sample set.
Comment 1 Josep Torra Valles 2011-08-10 10:00:19 UTC
Created attachment 193520 [details] [review]
warning #188: enumerated type mixed with another type
Comment 2 Josep Torra Valles 2011-08-10 10:01:48 UTC
Created attachment 193521 [details] [review]
warning #186: pointless comparison of unsigned integer
Comment 3 Josep Torra Valles 2011-08-10 10:03:12 UTC
Created attachment 193522 [details] [review]
warning #188: enumerated type mixed with another type
Comment 4 Josep Torra Valles 2011-08-10 10:04:02 UTC
Created attachment 193523 [details] [review]
warning #188: enumerated type mixed with another type
Comment 5 Josep Torra Valles 2011-08-10 10:04:28 UTC
Created attachment 193524 [details] [review]
warning #188: enumerated type mixed with another type
Comment 6 Josep Torra Valles 2011-08-10 10:04:54 UTC
Created attachment 193525 [details] [review]
warning #188: enumerated type mixed with another type
Comment 7 Josep Torra Valles 2011-08-10 10:05:18 UTC
Created attachment 193526 [details] [review]
warning #188: enumerated type mixed with another type
Comment 8 David Schleef 2011-08-12 00:29:25 UTC
Oooh, I like this warning.

Patch 3/8 appears to be incorrect.  Probably not terribly incorrect, but it would be better to refactor the code differently.
Comment 9 Tim-Philipp Müller 2011-08-15 20:20:24 UTC
commit 4985d2a954b293e56d670d10e2448ddd52d574d2
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Mon Aug 15 21:05:34 2011 +0100

    caps: fix compiler warning reported by ICC
    
    The MAX macro expands to code that checks if an unsigned integer is < 0.
    
    Fixes warning #186: pointless comparison of unsigned integer reported by ICC.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit c56881a02672f1e1d48479abbf6fb2165c46b1b4
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Wed Aug 10 11:39:23 2011 +0200

    buffer: explicitly cast to the enum type
    
    Fixes warning #188: enumerated type mixed with another type reported by ICC.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit 2271b6dc9a339a70b94090663258545f28d7b7e6
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Wed Aug 10 11:07:49 2011 +0200

    gststate: explicitly cast to the enum type
    
    Fixes warning #188: enumerated type mixed with another type reported by ICC.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit 89239d85cc76833df70b7b06a54a47d673ccf96a
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Tue Aug 9 23:42:26 2011 +0200

    event: explicitly cast to the right enum types
    
    Fixes warning #188: enumerated type mixed with another type reported by ICC.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit 7b434c44bfafcbe62cbfbac66fd8dc5968792deb
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Tue Aug 9 23:33:43 2011 +0200

    gsterror: explicitly cast to the right GstGError code enum types
    
    Fixes warning #188: enumerated type mixed with another type reported by ICC.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit b30b78c505e3543ad2dccee0e09a394beca8d98c
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Tue Aug 9 23:26:13 2011 +0200

    debugutils: use GST_STATE_VOID_PENDING for GstState instead of 0
    
    Fixes a warning reported by ICC.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit d99d270a69b31a945122998dab6959ad4cab763a
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Tue Aug 9 22:48:53 2011 +0200

    caps: define GST_CAPS_FLAGS_NONE for consistency with other enumerations
    
    Use them to fix warnings when building with ICC.
    
    API: GST_CAPS_FLAGS_NONE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265

commit abda75bcf58e2fdf7fde5c75caa5fe569c50b1f9
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Tue Aug 9 22:29:44 2011 +0200

    gst: use GstDebugLevel enum type to fix a warning building with ICC
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656265
Comment 10 Tim-Philipp Müller 2011-08-15 20:22:25 UTC
Comment on attachment 193521 [details] [review]
warning #186: pointless comparison of unsigned integer

Fixed this differently, replacing the MAX(0,i-j) with an explicit comparison