[xiph-commits] r13597 - trunk/theora/examples

tterribe at svn.xiph.org tterribe at svn.xiph.org
Thu Aug 23 13:07:31 PDT 2007


Author: tterribe
Date: 2007-08-23 13:07:30 -0700 (Thu, 23 Aug 2007)
New Revision: 13597

Modified:
   trunk/theora/examples/dump_video.c
   trunk/theora/examples/encoder_example.c
   trunk/theora/examples/player_example.c
Log:
General warning clean-up.


Modified: trunk/theora/examples/dump_video.c
===================================================================
--- trunk/theora/examples/dump_video.c	2007-08-23 20:05:38 UTC (rev 13596)
+++ trunk/theora/examples/dump_video.c	2007-08-23 20:07:30 UTC (rev 13597)
@@ -18,13 +18,26 @@
 /* By Mauricio Piacentini (mauricio at xiph.org) */
 /*  simply dump decoded YUV data, for verification of theora bitstream */
 
+#if !defined(_GNU_SOURCE)
 #define _GNU_SOURCE
+#endif
+#if !defined(_LARGEFILE_SOURCE)
 #define _LARGEFILE_SOURCE
+#endif
+#if !defined(_LARGEFILE64_SOURCE)
 #define _LARGEFILE64_SOURCE
+#endif
+#if !defined(_FILE_OFFSET_BITS)
 #define _FILE_OFFSET_BITS 64
+#endif
 
 #include <stdio.h>
+#if !defined(_WIN32)
+#include <getopt.h>
 #include <unistd.h>
+#else
+#include "getopt.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <sys/timeb.h>
@@ -37,7 +50,6 @@
 #include <fcntl.h>
 #include <math.h>
 #include <signal.h>
-#include "getopt.h"
 #include "theora/theoradec.h"
 
 const char *optstring = "o:rf";
@@ -165,7 +177,7 @@
   );
 }
 
-int main(int argc,char *argv[]){
+int main(int argc,char *const *argv){
 
   ogg_packet op;
 

Modified: trunk/theora/examples/encoder_example.c
===================================================================
--- trunk/theora/examples/encoder_example.c	2007-08-23 20:05:38 UTC (rev 13596)
+++ trunk/theora/examples/encoder_example.c	2007-08-23 20:07:30 UTC (rev 13597)
@@ -16,10 +16,18 @@
 
  ********************************************************************/
 
+#if !defined(_GNU_SOURCE)
 #define _GNU_SOURCE
+#endif
+#if !defined(_LARGEFILE_SOURCE)
 #define _LARGEFILE_SOURCE
+#endif
+#if !defined(_LARGEFILE64_SOURCE)
 #define _LARGEFILE64_SOURCE
+#endif
+#if !defined(_FILE_OFFSET_BITS)
 #define _FILE_OFFSET_BITS 64
+#endif
 
 /* Define to give performance data win32 only*/
 //#define THEORA_PERF_DATA 
@@ -37,16 +45,16 @@
 #endif
 
 #include <stdio.h>
-#ifndef WIN32
+#ifndef _WIN32
+#include <getopt.h>
 #include <unistd.h>
+#else
+#include "getopt.h"
 #endif
+#ifndef _WIN32
+#endif
 #include <stdlib.h>
 #include <string.h>
-#ifndef WIN32
-#include <getopt.h>
-#else
-#include "getopt.h"
-#endif
 #include <time.h>
 #include <math.h>
 #include "theora/theora.h"
@@ -567,7 +575,7 @@
   return videoflag;
 }
 
-int main(int argc,char *argv[]){
+int main(int argc,char *const *argv){
   int c,long_option_index,ret;
 
   ogg_stream_state to; /* take physical pages, weld into a logical

Modified: trunk/theora/examples/player_example.c
===================================================================
--- trunk/theora/examples/player_example.c	2007-08-23 20:05:38 UTC (rev 13596)
+++ trunk/theora/examples/player_example.c	2007-08-23 20:07:30 UTC (rev 13597)
@@ -25,10 +25,18 @@
    A simple 'demux and write back streams' would have been easier,
    it's true. */
 
+#if !defined(_GNU_SOURCE)
 #define _GNU_SOURCE
+#endif
+#if !defined(_LARGEFILE_SOURCE)
 #define _LARGEFILE_SOURCE
+#endif
+#if !defined(_LARGEFILE64_SOURCE)
 #define _LARGEFILE64_SOURCE
+#endif
+#if !defined(_FILE_OFFSET_BITS)
 #define _FILE_OFFSET_BITS 64
+#endif
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -434,7 +442,7 @@
   );
 }
 
-int main(int argc,char *argv[]){
+int main(int argc,char *const *argv){
 
   int pp_level_max;
   int pp_level;



More information about the commits mailing list