changeset 427:e7192ff1857d libavutil

Fix a couple of 'return type defaults to int' and 'control reaches end of non-void function' warnings in test code.
author diego
date Thu, 10 Jan 2008 10:35:37 +0000
parents d9390a931aef
children a092b8236682
files adler32.c crc.c integer.c mathematics.c md5.c
diffstat 5 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/adler32.c	Tue Jan 08 22:54:49 2008 +0000
+++ b/adler32.c	Thu Jan 10 10:35:37 2008 +0000
@@ -66,5 +66,6 @@
         STOP_TIMER("adler")
     }
     av_log(NULL, AV_LOG_DEBUG, "%X == 50E6E508\n", checksum);
+    return 0;
 }
 #endif
--- a/crc.c	Tue Jan 08 22:54:49 2008 +0000
+++ b/crc.c	Thu Jan 10 10:35:37 2008 +0000
@@ -130,7 +130,7 @@
 
 #ifdef TEST
 #undef printf
-main(void){
+int main(void){
     uint8_t buf[1999];
     int i;
     int p[4][3]={{AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04},
@@ -146,5 +146,6 @@
         ctx = av_crc_get_table(p[i][0]);
         printf("crc %08X =%X\n", p[i][1], av_crc(ctx, 0, buf, sizeof(buf)));
     }
+    return 0;
 }
 #endif
--- a/integer.c	Tue Jan 08 22:54:49 2008 +0000
+++ b/integer.c	Thu Jan 10 10:35:37 2008 +0000
@@ -171,7 +171,7 @@
         7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
 };
 
-main(void){
+int main(void){
     int64_t a,b;
 
     for(a=7; a<256*256*256; a+=13215){
@@ -192,5 +192,6 @@
             assert(av_i2int(av_div_i(ai,bi)) == a/b);
         }
     }
+    return 0;
 }
 #endif
--- a/mathematics.c	Tue Jan 08 22:54:49 2008 +0000
+++ b/mathematics.c	Thu Jan 10 10:35:37 2008 +0000
@@ -114,7 +114,7 @@
 #ifdef TEST
 #include "integer.h"
 #undef printf
-main(void){
+int main(void){
     int64_t a,b,c,d,e;
 
     for(a=7; a<(1LL<<62); a+=a/3+1){
@@ -136,5 +136,6 @@
             }
         }
     }
+    return 0;
 }
 #endif
--- a/md5.c	Tue Jan 08 22:54:49 2008 +0000
+++ b/md5.c	Thu Jan 10 10:35:37 2008 +0000
@@ -164,7 +164,7 @@
 #ifdef TEST
 #include <stdio.h>
 #undef printf
-main(void){
+int main(void){
     uint64_t md5val;
     int i;
     uint8_t in[1000];
@@ -176,5 +176,7 @@
     av_md5_sum( (uint8_t*)&md5val, in,  65); printf("%"PRId64"\n", md5val);
     for(i=0; i<1000; i++) in[i]= i % 127;
     av_md5_sum( (uint8_t*)&md5val, in,  999); printf("%"PRId64"\n", md5val);
+
+    return 0;
 }
 #endif