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 676824 - gst-rtsp-server is not compiled with warnings enabled...
gst-rtsp-server is not compiled with warnings enabled...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-25 15:05 UTC by Sebastian Rasmussen
Modified: 2012-06-09 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch for enabling compiler warnings. (1.28 KB, patch)
2012-05-25 15:09 UTC, Sebastian Rasmussen
none Details | Review
Proposed patch for suppressing compiler warnings when debug is disabled. (999 bytes, patch)
2012-05-25 15:09 UTC, Sebastian Rasmussen
none Details | Review
Proposed patch for enabling compiler warnings. (1003 bytes, patch)
2012-05-25 15:28 UTC, Sebastian Rasmussen
committed Details | Review
Proposed patch for suppressing compiler warnings when debug is disabled. (1.11 KB, patch)
2012-05-25 15:28 UTC, Sebastian Rasmussen
committed Details | Review
Proposed patch for fixing compiler warnings in gtkdoc-related files. (1.19 KB, patch)
2012-05-25 15:29 UTC, Sebastian Rasmussen
committed Details | Review

Description Sebastian Rasmussen 2012-05-25 15:05:54 UTC
When comparing gst-rtsp-server/configure.ac with those of
gst-plugins-* it is evident that GST_OPTION_CFLAGS is
missing WARNING_CFLAGS. The first patch adds this flag.

However, if gstreamer and gst-plugins-base are now built
with --disable-gst-debug we will get errors when compiling
gst-rtsp-server since warnings for unused variables are now
always enabled:

make[2]: Entering directory `/home/sebrn/src/upstream/gst-rtsp-server/gst/rtsp-server'
  CC     libgstrtspserver_1.0_la-rtsp-client.lo
rtsp-client.c: In function ‘error’:
rtsp-client.c:1685:18: error: unused variable ‘client’ [-Werror=unused-variable]
rtsp-client.c: In function ‘error_full’:
rtsp-client.c:1699:18: error: unused variable ‘client’ [-Werror=unused-variable]
rtsp-client.c: In function ‘gst_rtsp_client_accept’:
rtsp-client.c:1895:15: error: variable ‘url’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

The second patch adds a check to gst-rtsp-server/configure.ac
that tests whether gstreamer had --disable-gst-debug set or
not. This is done in the same way as for gst-plugins-*.

Now gst-rtsp-server itself builds properly, but we get new
errors when doing the introspection:

make[3]: Entering directory `/home/sebrn/src/upstream/gst-rtsp-server/docs/libs'
  DOC   Scanning header files
  DOC   Introspecting gobjects
gst-rtsp-server-scan.c: In function ‘get_object_types’:
gst-rtsp-server-scan.c:19:5: error: implicit declaration of function ‘gst_rtsp_auth_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:20:5: error: implicit declaration of function ‘gst_rtsp_media_mapping_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:21:5: error: implicit declaration of function ‘gst_rtsp_media_factory_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:22:5: error: implicit declaration of function ‘gst_rtsp_media_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:23:5: error: implicit declaration of function ‘gst_rtsp_server_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:24:5: error: implicit declaration of function ‘gst_rtsp_session_pool_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:25:5: error: implicit declaration of function ‘gst_rtsp_session_get_type’ [-Werror=implicit-function-declaration]
gst-rtsp-server-scan.c:26:5: error: implicit declaration of function ‘gst_rtsp_client_get_type’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
Compilation of scanner failed: 
make[3]: *** [scan-build.stamp] Error 1

The third and final patch includes the proper header files
to the documentation files so as to make these compile. I
did this in the same way that inclusions have been done in
gst-plugins-base/docs/libs/gst-plugins-base-libs.types.

After applying this patch series gst-rtsp-server compiles
with compiler warnings enabled, regardless of whether 
gstreamer was compiled with --disabled-gst-debug or not.
Comment 1 Sebastian Rasmussen 2012-05-25 15:09:24 UTC
Created attachment 214946 [details] [review]
Proposed patch for enabling compiler warnings.
Comment 2 Sebastian Rasmussen 2012-05-25 15:09:55 UTC
Created attachment 214947 [details] [review]
Proposed patch for suppressing compiler warnings when debug is disabled.
Comment 3 Sebastian Rasmussen 2012-05-25 15:28:10 UTC
Created attachment 214950 [details] [review]
Proposed patch for enabling compiler warnings.
Comment 4 Sebastian Rasmussen 2012-05-25 15:28:36 UTC
Created attachment 214951 [details] [review]
Proposed patch for suppressing compiler warnings when debug is disabled.
Comment 5 Sebastian Rasmussen 2012-05-25 15:29:09 UTC
Created attachment 214952 [details] [review]
Proposed patch for fixing compiler warnings in gtkdoc-related files.
Comment 6 Tim-Philipp Müller 2012-06-09 18:13:33 UTC
commit ef29cc6d78312c303f1f79fdc4c7623436be5eaa
Author: Sebastian Rasmussen <sebrn@axis.com>
Date:   Fri May 25 16:43:38 2012 +0200

    configure: suppress some warnings when debug is disabled
    
    Warnings about unused variables should be suppressed if core has the
    debug system disabled.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676824

commit 62532769a70e535d90e5065f1bdecab39fa14ed6
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Sat Jun 9 17:41:05 2012 +0100

    docs: fix build in uninstalled setup
    
    Include gst-plugins-base libs properly.

commit c3766ad376fbcd968919cbeb9654dad6cac0ca9e
Author: Sebastian Rasmussen <sebrn@axis.com>
Date:   Fri May 25 16:38:15 2012 +0200

    docs: include headers defining rtsp-server object types
    
    Fixes compiler warnings during docs build.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676824

commit b59f2354606b86c53dab5346525ab9bdf64decdf
Author: Sebastian Rasmussen <sebrn@axis.com>
Date:   Fri May 25 17:11:53 2012 +0200

    configure: Add warning flags for compiler when configuring
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676824