[Swfdec-commits] 5 commits - configure.ac m4/as-compiler-flag.m4 swfdec/jpeg

Benjamin Otte company at kemper.freedesktop.org
Fri Jun 6 15:22:07 PDT 2008


 configure.ac           |    4 ++--
 m4/as-compiler-flag.m4 |   14 ++++++++++----
 swfdec/jpeg/jpeg.c     |    3 ---
 swfdec/jpeg/jpeg.h     |    3 ++-
 4 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 9e76d43e80b290e221805f3f5371f90a5d91850b
Author: Benjamin Otte <otte at gnome.org>
Date:   Sat Jun 7 00:19:46 2008 +0200

    emit a warning for unsupported flags
    
    turns out gcc 4.2 can't do -Wlogical-op, so if you use gcc 4.3 and get
    complaints, poke us

diff --git a/m4/as-compiler-flag.m4 b/m4/as-compiler-flag.m4
index 3c40a87..0f660cf 100644
--- a/m4/as-compiler-flag.m4
+++ b/m4/as-compiler-flag.m4
@@ -37,7 +37,8 @@ dnl Tries to compile with the given CFLAGS.
 AC_DEFUN([AS_COMPILER_FLAGS],
 [
   list=$2
-  flag_list=""
+  flags_supported=""
+  flags_unsupported=""
   AC_MSG_CHECKING([for supported compiler flags])
   for each in $list
   do
@@ -47,10 +48,15 @@ AC_DEFUN([AS_COMPILER_FLAGS],
     CFLAGS="$save_CFLAGS"
 
     if test "X$flag_ok" = Xyes ; then
-      flag_list="$flag_list $each"
+      flags_supported="$flags_supported $each"
+    else
+      flags_unsupported="$flags_unsupported $each"
     fi
   done
-  AC_MSG_RESULT([$flag_list])
-  $1="$$1 $flag_list"
+  AC_MSG_RESULT([$flags_supported])
+  if test "X$flags_unsupported" != X ; then
+    AC_MSG_WARN([unsupported compiler flags: $flags_unsupported])
+  fi
+  $1="$$1 $flags_supported"
 ])
 
commit d1e02a67996b6cfb896cfdc92d8da4529c4f339c
Author: Benjamin Otte <otte at gnome.org>
Date:   Sat Jun 7 00:11:16 2008 +0200

    add more warning flags
    
    And whoo, it still compiles!

diff --git a/configure.ac b/configure.ac
index 02f4b2b..ca54cec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ AC_CONFIG_MACRO_DIR([m4])
 dnl decide on error flags
 dnl if we support them, we set them unconditionally
 dnl FIXME: I want this but stupid headers don't let me: -Wshadow
-AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security -Wswitch-enum -Wswitch-default")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security -Wswitch-enum -Wswitch-default -Winit-self -Wmissing-include-dirs -Wundef -Waddress -Wlogical-op -Waggregate-return -Wmissing-format-attribute -Wno-multichar -Wnested-externs")
 dnl if we're in nano >= 1, add -Werror if supported
 if test x$SWFDEC_CVS = xyes ; then
   AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Werror")
commit bf59bdd033dd8f3a72c868c5956018e78b499c06
Author: Benjamin Otte <otte at gnome.org>
Date:   Sat Jun 7 00:11:02 2008 +0200

    whoops, used wrong macro here

diff --git a/configure.ac b/configure.ac
index 8ea8590..02f4b2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,7 @@ AC_SUBST(SWFDEC_LIBVERSION)
 AM_PROG_LIBTOOL
 
 dnl C99 is only required to get definitions for NAN and INFINITY.
-AS_COMPILER_FLAG(GLOBAL_CFLAGS, "-std=gnu99")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-std=gnu99")
 
 dnl ensures the library is linked against the internal Mozilla
 dnl if this doesn't work on your platform, I'll take patches :)
commit 3e68bcba8a467e39180415913f4c0718faa58ddc
Author: Benjamin Otte <otte at gnome.org>
Date:   Sat Jun 7 00:07:54 2008 +0200

    mark printf function as such

diff --git a/swfdec/jpeg/jpeg.h b/swfdec/jpeg/jpeg.h
index a52bb9b..066df75 100644
--- a/swfdec/jpeg/jpeg.h
+++ b/swfdec/jpeg/jpeg.h
@@ -4,6 +4,7 @@
 
 #include <jpeg/jpeg_bits.h>
 
+#include <glib.h>
 #include <stdint.h>
 
 #ifndef TRUE
@@ -159,7 +160,7 @@ uint32_t *jpeg_decoder_get_argb_image (JpegDecoder *dec);
 int jpeg_decode_argb (uint8_t *data, int length, uint32_t **image,
     unsigned int *width, unsigned int *height);
 
-void jpeg_decoder_error(JpegDecoder *dec, const char *fmt, ...);
+void jpeg_decoder_error(JpegDecoder *dec, const char *fmt, ...) G_GNUC_PRINTF (2, 3);
 
 int jpeg_decoder_sof_baseline_dct(JpegDecoder *dec, JpegBits *bits);
 int jpeg_decoder_define_quant_table(JpegDecoder *dec, JpegBits *bits);
commit f03159dff12fe5a052f57bf726b1dfd6eb3f733e
Author: Benjamin Otte <otte at gnome.org>
Date:   Sat Jun 7 00:06:32 2008 +0200

    remove excessive whitespace

diff --git a/swfdec/jpeg/jpeg.c b/swfdec/jpeg/jpeg.c
index 7ff4187..d49f418 100644
--- a/swfdec/jpeg/jpeg.c
+++ b/swfdec/jpeg/jpeg.c
@@ -162,9 +162,6 @@ jpeg_decoder_init_decoder (JpegDecoder *dec)
     return;
   }
 
-
-
-
   for (i=0; i < dec->n_components; i++) {
     max_h_sample = MAX (max_h_sample, dec->components[i].h_sample);
     max_v_sample = MAX (max_v_sample, dec->components[i].v_sample);


More information about the Swfdec-commits mailing list