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 529488 - [sidplay] Missing sentinel in function call
[sidplay] Missing sentinel in function call
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal major
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-23 05:50 UTC by Sebastian Dröge (slomo)
Modified: 2008-04-25 23:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2008-04-23 05:50:21 UTC
Hi,
current -ugly CVS produces a compiler warnings in gstsiddec.cc:

cc1plus: warnings being treated as errors
gstsiddec.cc: In function 'void update_tags(GstSidDec*)':
gstsiddec.cc:302: warning: missing sentinel in function call
gstsiddec.cc:306: warning: missing sentinel in function call
gstsiddec.cc:310: warning: missing sentinel in function call

This is with gcc version 4.2.1 20070719  [FreeBSD].

The lines in question are like:
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_TITLE, info.nameString, NULL);

So a sentinel is actually there unless I'm missing something. Is this just a compiler bug?
Comment 1 Sebastian Dröge (slomo) 2008-04-25 23:10:43 UTC
Hm, the g++ docs suggest that you can't use NULL as a sentinel in C++:

-Wstrict-null-sentinel (C++ only)
    Warn also about the use of an uncasted NULL as sentinel. When compiling only
    with GCC this is a valid sentinel, as NULL is defined to __null.
    Although it is a null pointer constant not a null pointer, it is guaranteed
    to of the same size as a pointer. But this use is not portable across
    different compilers.

2008-04-26  Sebastian Dröge  <slomo@circular-chaos.org>

        * ext/sidplay/gstsiddec.cc:
        Cast NULL sentinels to void * as NULL is defined as an integer
        constant in most environments when using C++ and it's size might
        be different from a pointer. Fixes #529488.