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 767816 - Comparison of constant 64 with expression of type 'GstVideoFormat' is always false in Mac OS X
Comparison of constant 64 with expression of type 'GstVideoFormat' is always ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Mac OS
: Normal normal
: 1.9.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-18 15:27 UTC by Francisco Velazquez
Modified: 2016-07-11 21:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Error in "homebrew machine" (2.90 KB, text/plain)
2016-06-18 15:27 UTC, Francisco Velazquez
Details
Error in "macports machine" (2.51 KB, text/plain)
2016-06-18 15:28 UTC, Francisco Velazquez
Details

Description Francisco Velazquez 2016-06-18 15:27:51 UTC
Created attachment 329997 [details]
Error in "homebrew machine"

The error occurs when compiling in Mac OS X.  I tested it in two machines, one using macports and the other homebrew for installing dependencies.
Comment 1 Francisco Velazquez 2016-06-18 15:28:28 UTC
Created attachment 329998 [details]
Error in "macports machine"
Comment 2 Francisco Velazquez 2016-06-18 15:29:47 UTC
To make gst-plugins-base, the ERROR_CFLAGS='' is needed.

The code compiles fine in Linux.
Comment 3 Sebastian Dröge (slomo) 2016-06-21 07:50:22 UTC
Do you want to provide a patch? The solution here would be to first cast "format" to a gint. Can you confirm?

The compiler warning is wrong though, but let's work around it.
Comment 4 Tim-Philipp Müller 2016-06-21 08:08:21 UTC
I think the warning is right, it's just that we do these checks on purpose (e.g. to catch usage of something that has been compiled against newer headers with more formats against an older lib, or bogus values).
Comment 5 Sebastian Dröge (slomo) 2016-06-21 08:13:02 UTC
There's nothing "wrong" from the C point of view to pass a random integer instead of one of the actual enum values
Comment 6 Sebastian Dröge (slomo) 2016-07-11 21:14:53 UTC
commit 02a88077fcef7444d0cc7382b6274a3a4bd598d9
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Jul 12 00:13:32 2016 +0300

    video: Fix some compiler warnings for out-of-range enum values
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767816