GNOME Bugzilla – Bug 656265
Fix compiler warnings reported by ICC
Last modified: 2011-08-15 20:23:17 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.
Created attachment 193520 [details] [review] warning #188: enumerated type mixed with another type
Created attachment 193521 [details] [review] warning #186: pointless comparison of unsigned integer
Created attachment 193522 [details] [review] warning #188: enumerated type mixed with another type
Created attachment 193523 [details] [review] warning #188: enumerated type mixed with another type
Created attachment 193524 [details] [review] warning #188: enumerated type mixed with another type
Created attachment 193525 [details] [review] warning #188: enumerated type mixed with another type
Created attachment 193526 [details] [review] warning #188: enumerated type mixed with another type
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.
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 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