GNOME Bugzilla – Bug 676824
gst-rtsp-server is not compiled with warnings enabled...
Last modified: 2012-06-09 18:14:05 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.
Created attachment 214946 [details] [review] Proposed patch for enabling compiler warnings.
Created attachment 214947 [details] [review] Proposed patch for suppressing compiler warnings when debug is disabled.
Created attachment 214950 [details] [review] Proposed patch for enabling compiler warnings.
Created attachment 214951 [details] [review] Proposed patch for suppressing compiler warnings when debug is disabled.
Created attachment 214952 [details] [review] Proposed patch for fixing compiler warnings in gtkdoc-related files.
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