Add -Wundef to configure flags

and fix the resulting warnings
This commit is contained in:
Benjamin Otte 2010-03-17 21:33:28 +01:00
parent 88ee9d817c
commit c76e72a7f5
6 changed files with 12 additions and 11 deletions

View File

@ -272,10 +272,10 @@ dnl set location of plugin directory
AG_GST_SET_PLUGINDIR AG_GST_SET_PLUGINDIR
dnl define an ERROR_CFLAGS Makefile variable dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls]) AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef])
dnl define an ERROR_CXXFLAGS Makefile variable dnl define an ERROR_CXXFLAGS Makefile variable
AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wredundant-decls]) AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wredundant-decls -Wundef])
dnl define correct level for debugging messages dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT) AG_GST_SET_LEVEL_DEFAULT($GST_GIT)

View File

@ -187,7 +187,7 @@ gst_jpegenc_class_init (GstJpegEnc * klass)
g_param_spec_int ("quality", "Quality", "Quality of encoding", g_param_spec_int ("quality", "Quality", "Quality of encoding",
0, 100, JPEG_DEFAULT_QUALITY, G_PARAM_READWRITE)); 0, 100, JPEG_DEFAULT_QUALITY, G_PARAM_READWRITE));
#if ENABLE_SMOOTHING #ifdef ENABLE_SMOOTHING
/* disabled, since it doesn't seem to work */ /* disabled, since it doesn't seem to work */
g_object_class_install_property (gobject_class, PROP_SMOOTHING, g_object_class_install_property (gobject_class, PROP_SMOOTHING,
g_param_spec_int ("smoothing", "Smoothing", "Smoothing factor", g_param_spec_int ("smoothing", "Smoothing", "Smoothing factor",
@ -416,7 +416,7 @@ gst_jpegenc_resync (GstJpegEnc * jpegenc)
GST_DEBUG_OBJECT (jpegenc, "width %d, height %d", width, height); GST_DEBUG_OBJECT (jpegenc, "width %d, height %d", width, height);
#if ENABLE_COLORSPACE_RGB #ifdef ENABLE_COLORSPACE_RGB
switch (jpegenc->format) { switch (jpegenc->format) {
case GST_COLORSPACE_RGB24: case GST_COLORSPACE_RGB24:
jpegenc->bufsize = jpegenc->width * jpegenc->height * 3; jpegenc->bufsize = jpegenc->width * jpegenc->height * 3;
@ -450,7 +450,7 @@ gst_jpegenc_resync (GstJpegEnc * jpegenc)
} }
GST_DEBUG_OBJECT (jpegenc, "setting format done"); GST_DEBUG_OBJECT (jpegenc, "setting format done");
#if ENABLE_COLORSPACE_RGB #ifdef ENABLE_COLORSPACE_RGB
break; break;
default: default:
printf ("gst_jpegenc_resync: unsupported colorspace, using RGB\n"); printf ("gst_jpegenc_resync: unsupported colorspace, using RGB\n");
@ -581,7 +581,7 @@ gst_jpegenc_set_property (GObject * object, guint prop_id,
case PROP_QUALITY: case PROP_QUALITY:
jpegenc->quality = g_value_get_int (value); jpegenc->quality = g_value_get_int (value);
break; break;
#if ENABLE_SMOOTHING #ifdef ENABLE_SMOOTHING
case PROP_SMOOTHING: case PROP_SMOOTHING:
jpegenc->smoothing = g_value_get_int (value); jpegenc->smoothing = g_value_get_int (value);
break; break;
@ -609,7 +609,7 @@ gst_jpegenc_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_QUALITY: case PROP_QUALITY:
g_value_set_int (value, jpegenc->quality); g_value_set_int (value, jpegenc->quality);
break; break;
#if ENABLE_SMOOTHING #ifdef ENABLE_SMOOTHING
case PROP_SMOOTHING: case PROP_SMOOTHING:
g_value_set_int (value, jpegenc->smoothing); g_value_set_int (value, jpegenc->smoothing);
break; break;

View File

@ -67,7 +67,7 @@ struct _GstSpeexEnc {
SpeexBits bits; SpeexBits bits;
SpeexHeader header; SpeexHeader header;
#if SPEEX_1_0 #ifdef SPEEX_1_0
SpeexMode *speex_mode; SpeexMode *speex_mode;
#else #else
const SpeexMode *speex_mode; const SpeexMode *speex_mode;

View File

@ -18,7 +18,7 @@
*/ */
#include <glib.h> #include <glib.h>
#if WORDS_BIGENDIAN #if G_BYTE_ORDER == G_BIG_ENDIAN
#define COLOR_ARGB #define COLOR_ARGB
#else #else
#define COLOR_BGRA #define COLOR_BGRA

View File

@ -22,13 +22,14 @@
#ifndef MATHTOOLS_H #ifndef MATHTOOLS_H
#define MATHTOOLS_H #define MATHTOOLS_H
#include <glib.h>
#define _double2fixmagic (68719476736.0*1.5) #define _double2fixmagic (68719476736.0*1.5)
/* 2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor */ /* 2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor */
#define _shiftamt 16 #define _shiftamt 16
/* 16.16 fixed point representation */ /* 16.16 fixed point representation */
#if BigEndian_ #if G_BYTE_ORDER == G_BIG_ENDIAN
#define iexp_ 0 #define iexp_ 0
#define iman_ 1 #define iman_ 1
#else #else

View File

@ -258,7 +258,7 @@ GST_START_TEST (test_int16_panned)
GST_DEBUG ("%s[0] is %lf", fields[j], dB); GST_DEBUG ("%s[0] is %lf", fields[j], dB);
#ifdef HAVE_ISINF #ifdef HAVE_ISINF
fail_unless (isinf (dB)); fail_unless (isinf (dB));
#elif HAVE_FPCLASS #elif defined (HAVE_FPCLASS)
fail_unless (fpclass (dB) == FP_NINF); fail_unless (fpclass (dB) == FP_NINF);
#endif #endif
} }