diff options
author | Rob Clark <rob@ti.com> | 2011-01-26 10:40:08 -0600 |
---|---|---|
committer | Rob Clark <rob@ti.com> | 2011-01-26 11:41:01 -0600 |
commit | abc48530fe3f4842d7cff28a76e635b0eb2303e7 (patch) | |
tree | 9e3a56af31499e04a88b904c71343196ebe6bd48 | |
parent | be7c27aa2c419445df1ffb7e1e2fdaa7c7955997 (diff) |
Improved compiler warning flags strictness
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | src/gstducatibufferpool.c | 2 | ||||
-rw-r--r-- | src/gstducatimpeg2dec.c | 2 | ||||
-rw-r--r-- | src/gstducatirvdec.c | 1 | ||||
-rw-r--r-- | src/gstducatividdec.c | 10 | ||||
-rw-r--r-- | src/gstducatividdec.h | 3 |
6 files changed, 19 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index c70edfe..04a9452 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,14 @@ AC_CONFIG_MACRO_DIR([m4]) dnl initialize GStreamer macros AG_GST_INIT dnl define an ERROR_CFLAGS Makefile variable -AG_GST_SET_ERROR_CFLAGS($GST_CVS) +AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ + -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls + -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition + -Winit-self -Wmissing-include-dirs -Waddress + -Waggregate-return -Wno-multichar]) + +dnl define correct level for debugging messages +AG_GST_SET_LEVEL_DEFAULT($GST_GIT) dnl set up gettext dnl the version check needs to stay here because autopoint greps for it @@ -108,7 +115,7 @@ DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED" AC_SUBST(DEPRECATED_CFLAGS) dnl every flag in GST_OPTION_CFLAGS can be overridden at make time -GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)" +GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)" AC_SUBST(GST_OPTION_CFLAGS) dnl our libraries need to be versioned correctly @@ -118,7 +125,7 @@ dnl FIXME: do we want to rename to GST_ALL_* ? dnl prefer internal headers to already installed ones dnl also add builddir include for enumtypes and marshal dnl add GST_OPTION_CFLAGS, but overridable -GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)" +GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)" AC_SUBST(GST_CFLAGS) AC_SUBST(GST_LIBS) diff --git a/src/gstducatibufferpool.c b/src/gstducatibufferpool.c index 6be3727..4d9ea27 100644 --- a/src/gstducatibufferpool.c +++ b/src/gstducatibufferpool.c @@ -176,7 +176,7 @@ gst_ducati_bufferpool_get (GstDucatiBufferPool * self, GstBuffer * orig) { GstDucatiBuffer *buf = NULL; - g_return_if_fail (self); + g_return_val_if_fail (self, NULL); GST_DUCATI_BUFFERPOOL_LOCK (self); if (self->running) { diff --git a/src/gstducatimpeg2dec.c b/src/gstducatimpeg2dec.c index eada5f4..33d47c9 100644 --- a/src/gstducatimpeg2dec.c +++ b/src/gstducatimpeg2dec.c @@ -74,7 +74,7 @@ gst_ducati_mpeg2dec_allocate_params (GstDucatiVidDec * self, gint params_sz, sizeof (IMPEG2VDEC_OutArgs)); if (ret) { - IMPEG2VDEC_Params *params = (IMPEG2VDEC_Params *) self->params; +// IMPEG2VDEC_Params *params = (IMPEG2VDEC_Params *) self->params; self->params->displayDelay = IVIDDEC3_DISPLAY_DELAY_AUTO; } diff --git a/src/gstducatirvdec.c b/src/gstducatirvdec.c index bd1eab3..f1b650e 100644 --- a/src/gstducatirvdec.c +++ b/src/gstducatirvdec.c @@ -98,7 +98,6 @@ static gboolean gst_ducati_rvdec_allocate_params (GstDucatiVidDec * vdec, gint params_sz, gint dynparams_sz, gint status_sz, gint inargs_sz, gint outargs_sz) { - GstDucatiRVDec *self = GST_DUCATIRVDEC (vdec); gboolean ret = parent_class->allocate_params (vdec, sizeof (IrealVDEC_Params), sizeof (IrealVDEC_DynamicParams), sizeof (IrealVDEC_Status), sizeof (IrealVDEC_InArgs), diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c index 3696b2f..a21a85a 100644 --- a/src/gstducatividdec.c +++ b/src/gstducatividdec.c @@ -95,7 +95,7 @@ engine_open (GstDucatiVidDec * self) GST_DEBUG_OBJECT (self, "opening engine"); - self->engine = Engine_open ("ivahd_vidsvr", NULL, NULL); + self->engine = Engine_open ((String)"ivahd_vidsvr", NULL, NULL); if (G_UNLIKELY (!self->engine)) { GST_ERROR_OBJECT (self, "could not create engine"); return FALSE; @@ -149,7 +149,7 @@ codec_create (GstDucatiVidDec * self) /* create codec: */ GST_DEBUG_OBJECT (self, "creating codec: %s", codec_name); - self->codec = VIDDEC3_create (self->engine, (char *)codec_name, self->params); + self->codec = VIDDEC3_create (self->engine, (String)codec_name, self->params); if (!self->codec) { return FALSE; @@ -398,7 +398,7 @@ gst_ducati_viddec_parse_caps (GstDucatiVidDec * self, GstStructure * s) self->width = w; self->height = h; - const GValue *codec_data = gst_structure_get_value (s, "codec_data"); + codec_data = gst_structure_get_value (s, "codec_data"); if (codec_data) { GstBuffer *buffer = gst_value_get_buffer (codec_data); @@ -474,6 +474,8 @@ gst_ducati_viddec_allocate_params (GstDucatiVidDec * self, gint params_sz, } self->inArgs->size = inargs_sz; self->outArgs->size = outargs_sz; + + return TRUE; } static GstBuffer * @@ -569,6 +571,8 @@ gst_ducati_viddec_query (GstPad * pad, GstQuery * query) { GstDucatiVidDec *self = GST_DUCATIVIDDEC (GST_OBJECT_PARENT (pad)); + GST_DEBUG_OBJECT (self, "query: %"GST_PTR_FORMAT, query); + switch (GST_QUERY_TYPE (query)) { case GST_QUERY_BUFFERS: GST_DEBUG_OBJECT (self, "min buffers: %d", self->min_buffers); diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h index 2c25338..190b953 100644 --- a/src/gstducatividdec.h +++ b/src/gstducatividdec.h @@ -27,9 +27,6 @@ G_BEGIN_DECLS -// XXX move these -GST_DEBUG_CATEGORY_EXTERN (gst_ducati_debug); - #define GST_TYPE_DUCATIVIDDEC (gst_ducati_viddec_get_type()) #define GST_DUCATIVIDDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DUCATIVIDDEC, GstDucatiVidDec)) |