[x264-devel] avoid C99ism

Loïc Le Loarer lll+vlc at m4x.org
Wed Jul 30 23:54:11 CEST 2008


Hi,

git version control wrote:
> 
> fix C99ism

To avoid having to fix this often, I suggest to add the
-Wdeclaration-after-statement option to gcc so that variable declaration
in the middle of a block is detected earlier.

Here is a patch proposal:
diff --git a/configure b/configure
index 29e1b25..35955a4 100755
--- a/configure
+++ b/configure
@@ -63,7 +63,7 @@ vis="no"
 shared="no"

 CC="${CC-gcc}"
-CFLAGS="$CFLAGS -Wall -I."
+CFLAGS="$CFLAGS -Wall -Wdeclaration-after-statement -I."
 LDFLAGS="$LDFLAGS"
 HAVE_GETOPT_LONG=1

By the way, I don't know what is the rationnal about refusing this
construction, probably some supported compiler not supporting it, does
some one can recall why ?

Thanks,
Best regards
-- 
Loïc

"heaven is not a place, it's a feeling"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20080730/db6d9e86/attachment.pgp 


More information about the x264-devel mailing list