changeset 396:96f8086bc2ba libavformat

warning patrol
author mellum
date Wed, 24 Mar 2004 23:32:48 +0000
parents c1ed10f3b052
children f2f776a902c1
files file.c framehook.h matroska.c movenc.c mpeg.c
diffstat 5 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/file.c	Wed Mar 24 19:03:20 2004 +0000
+++ b/file.c	Wed Mar 24 23:32:48 2004 +0000
@@ -50,26 +50,26 @@
     fd = open(filename, access, 0666);
     if (fd < 0)
         return -ENOENT;
-    h->priv_data = (void *)fd;
+    h->priv_data = (void *)(size_t)fd;
     return 0;
 }
 
 static int file_read(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return read(fd, buf, size);
 }
 
 static int file_write(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return write(fd, buf, size);
 }
 
 /* XXX: use llseek */
 static offset_t file_seek(URLContext *h, offset_t pos, int whence)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
 #ifdef CONFIG_WIN32
     return _lseeki64(fd, pos, whence);
 #else
@@ -79,7 +79,7 @@
 
 static int file_close(URLContext *h)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return close(fd);
 }
 
@@ -106,19 +106,19 @@
 #if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__)
     setmode(fd, O_BINARY);
 #endif
-    h->priv_data = (void *)fd;
+    h->priv_data = (void *)(size_t)fd;
     return 0;
 }
 
 static int pipe_read(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return read(fd, buf, size);
 }
 
 static int pipe_write(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return write(fd, buf, size);
 }
 
--- a/framehook.h	Wed Mar 24 19:03:20 2004 +0000
+++ b/framehook.h	Wed Mar 24 23:32:48 2004 +0000
@@ -24,6 +24,6 @@
 
 extern int frame_hook_add(int argc, char *argv[]);
 extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height);
-extern void frame_hook_release();
+extern void frame_hook_release(void);
 
 #endif
--- a/matroska.c	Wed Mar 24 19:03:20 2004 +0000
+++ b/matroska.c	Wed Mar 24 23:32:48 2004 +0000
@@ -927,7 +927,7 @@
                     return res;
                 if (num > sizeof(uint32_t)) {
                     av_log(matroska->ctx, AV_LOG_ERROR,
-                           "IDs of size %llu (> %d) not supported\n",
+                           "IDs of size %llu (> %zu) not supported\n",
 			    num, sizeof(uint32_t));
                     return AVERROR_INVALIDDATA;
                 }
--- a/movenc.c	Wed Mar 24 19:03:20 2004 +0000
+++ b/movenc.c	Wed Mar 24 23:32:48 2004 +0000
@@ -917,7 +917,7 @@
     return 0;
 }
 
-static int Timestamp() {
+static int Timestamp(void) {
     return 1067949799U+(24107*86400); //its the modification time of this line :)
 }
 
--- a/mpeg.c	Wed Mar 24 19:03:20 2004 +0000
+++ b/mpeg.c	Wed Mar 24 23:32:48 2004 +0000
@@ -82,10 +82,10 @@
 static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
 
 #ifdef CONFIG_ENCODERS
-extern AVOutputFormat mpeg1system_mux;
-extern AVOutputFormat mpeg1vcd_mux;
-extern AVOutputFormat mpeg2vob_mux;
-extern AVOutputFormat mpeg2svcd_mux;
+static AVOutputFormat mpeg1system_mux;
+static AVOutputFormat mpeg1vcd_mux;
+static AVOutputFormat mpeg2vob_mux;
+static AVOutputFormat mpeg2svcd_mux;
 
 static int put_pack_header(AVFormatContext *ctx, 
                            uint8_t *buf, int64_t timestamp)