diff --git a/libavformat/timefilter.c b/libavformat/timefilter.c
index e1cff8d5e56a0c2912b66e58705baa9d1d8813e0..79d417aaf6bd31f795359da434e64289d40cba1d 100644
--- a/libavformat/timefilter.c
+++ b/libavformat/timefilter.c
@@ -74,7 +74,8 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
 }
 
 #ifdef TEST
-main(){
+int main(void)
+{
     double n0,n1;
 #define SAMPLES 1000
     double ideal[SAMPLES];
@@ -118,5 +119,6 @@ main(){
         }
         printf("\n");
     }
+    return 0;
 }
 #endif