Commit dd07e857 authored by diego's avatar diego

Fix a couple of 'return type defaults to int' and 'control reaches end of

non-void function' warnings in test code.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11491 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d347d2f1
...@@ -66,5 +66,6 @@ int main(void){ ...@@ -66,5 +66,6 @@ int main(void){
STOP_TIMER("adler") STOP_TIMER("adler")
} }
av_log(NULL, AV_LOG_DEBUG, "%X == 50E6E508\n", checksum); av_log(NULL, AV_LOG_DEBUG, "%X == 50E6E508\n", checksum);
return 0;
} }
#endif #endif
...@@ -130,7 +130,7 @@ uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t le ...@@ -130,7 +130,7 @@ uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t le
#ifdef TEST #ifdef TEST
#undef printf #undef printf
main(void){ int main(void){
uint8_t buf[1999]; uint8_t buf[1999];
int i; int i;
int p[4][3]={{AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04}, int p[4][3]={{AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04},
...@@ -146,5 +146,6 @@ main(void){ ...@@ -146,5 +146,6 @@ main(void){
ctx = av_crc_get_table(p[i][0]); ctx = av_crc_get_table(p[i][0]);
printf("crc %08X =%X\n", p[i][1], av_crc(ctx, 0, buf, sizeof(buf))); printf("crc %08X =%X\n", p[i][1], av_crc(ctx, 0, buf, sizeof(buf)));
} }
return 0;
} }
#endif #endif
...@@ -171,7 +171,7 @@ const uint8_t ff_log2_tab[256]={ ...@@ -171,7 +171,7 @@ const uint8_t ff_log2_tab[256]={
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,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; int64_t a,b;
for(a=7; a<256*256*256; a+=13215){ for(a=7; a<256*256*256; a+=13215){
...@@ -192,5 +192,6 @@ main(void){ ...@@ -192,5 +192,6 @@ main(void){
assert(av_i2int(av_div_i(ai,bi)) == a/b); assert(av_i2int(av_div_i(ai,bi)) == a/b);
} }
} }
return 0;
} }
#endif #endif
...@@ -114,7 +114,7 @@ int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq){ ...@@ -114,7 +114,7 @@ int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq){
#ifdef TEST #ifdef TEST
#include "integer.h" #include "integer.h"
#undef printf #undef printf
main(void){ int main(void){
int64_t a,b,c,d,e; int64_t a,b,c,d,e;
for(a=7; a<(1LL<<62); a+=a/3+1){ for(a=7; a<(1LL<<62); a+=a/3+1){
...@@ -136,5 +136,6 @@ main(void){ ...@@ -136,5 +136,6 @@ main(void){
} }
} }
} }
return 0;
} }
#endif #endif
...@@ -164,7 +164,7 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){ ...@@ -164,7 +164,7 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){
#ifdef TEST #ifdef TEST
#include <stdio.h> #include <stdio.h>
#undef printf #undef printf
main(void){ int main(void){
uint64_t md5val; uint64_t md5val;
int i; int i;
uint8_t in[1000]; uint8_t in[1000];
...@@ -176,5 +176,7 @@ main(void){ ...@@ -176,5 +176,7 @@ main(void){
av_md5_sum( (uint8_t*)&md5val, in, 65); printf("%"PRId64"\n", md5val); av_md5_sum( (uint8_t*)&md5val, in, 65); printf("%"PRId64"\n", md5val);
for(i=0; i<1000; i++) in[i]= i % 127; for(i=0; i<1000; i++) in[i]= i % 127;
av_md5_sum( (uint8_t*)&md5val, in, 999); printf("%"PRId64"\n", md5val); av_md5_sum( (uint8_t*)&md5val, in, 999); printf("%"PRId64"\n", md5val);
return 0;
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment