From e25e5998d1e8a3ffb3417a0effe1b7ce5999bbb5 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Mon, 22 May 2006 16:57:36 +0000 Subject: Fixed gcc warnings (Adrian Schroeter). CVS patchset: 7993 CVS date: 2006/05/22 16:57:36 --- src/libffmpeg/libavcodec/truemotion1.c | 2 +- src/libffmpeg/libavutil/common.h | 2 ++ src/libw32dll/wine/ext.c | 20 ++++++++++---------- src/post/goom/filters.c | 2 +- src/post/goom/ifs.c | 2 +- src/post/goom/tentacle3d.c | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/libffmpeg/libavcodec/truemotion1.c b/src/libffmpeg/libavcodec/truemotion1.c index d2c9efbf8..728dbcdb7 100644 --- a/src/libffmpeg/libavcodec/truemotion1.c +++ b/src/libffmpeg/libavcodec/truemotion1.c @@ -322,7 +322,7 @@ static void gen_vector_table24(TrueMotion1Context *s, const uint8_t *sel_vector_ static int truemotion1_decode_header(TrueMotion1Context *s) { int i; - struct frame_header header; + struct frame_header header = {0}; uint8_t header_buffer[128]; /* logical maximum size of the header */ const uint8_t *sel_vector_table; diff --git a/src/libffmpeg/libavutil/common.h b/src/libffmpeg/libavutil/common.h index 33fd59518..a0ef2faee 100644 --- a/src/libffmpeg/libavutil/common.h +++ b/src/libffmpeg/libavutil/common.h @@ -539,7 +539,9 @@ tend= read_time();\ #define time time_is_forbidden_due_to_security_issues #define rand rand_is_forbidden_due_to_state_trashing #define srand srand_is_forbidden_due_to_state_trashing +#undef sprintf #define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf +#undef strcat #define strcat strcat_is_forbidden_due_to_security_issues_use_pstrcat #if !(defined(LIBAVFORMAT_BUILD) || defined(_FRAMEHOOK_H)) //#define printf please_use_av_log diff --git a/src/libw32dll/wine/ext.c b/src/libw32dll/wine/ext.c index 8a791cab9..596c85c55 100644 --- a/src/libw32dll/wine/ext.c +++ b/src/libw32dll/wine/ext.c @@ -467,14 +467,14 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec return NULL; } - if (type&MEM_RESERVE && (unsigned)address&0xffff) { - size += (unsigned)address&0xffff; - address = (LPVOID)((unsigned)address & ~0xffff); + if (type&MEM_RESERVE && (void*)((unsigned long)address&0xffff)) { + size += (unsigned long)address&0xffff; + address = (LPVOID)((unsigned long)address & ~0xffff); } pgsz = sysconf(_SC_PAGESIZE); - if (type&MEM_COMMIT && (unsigned)address%pgsz) { - size += (unsigned)address%pgsz; - address -= (unsigned)address%pgsz; + if (type&MEM_COMMIT && (void*)((unsigned long)address%pgsz)) { + size += (unsigned long)address%pgsz; + address -= (unsigned long)address%pgsz; } if (type&MEM_RESERVE && size<0x10000) size = 0x10000; @@ -486,12 +486,12 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec virt_alloc* str=vm; while(str) { - if((unsigned)address>=(unsigned)str->address+str->mapping_size) + if((void*)((unsigned long)address)>=(void*)((unsigned long)str->address+str->mapping_size)) { str=str->prev; continue; } - if((unsigned)address+size<=(unsigned)str->address) + if((void*)((unsigned long)address+size)<=(void*)((unsigned long)str->address)) { str=str->prev; continue; @@ -499,8 +499,8 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec if(str->state==0) { #warning FIXME - if( ((unsigned)address >= (unsigned)str->address) - && ((unsigned)address+size<=(unsigned)str->address+str->mapping_size) + if( (address >= (void*)(unsigned long)str->address) + && ((void*)((unsigned long)address+size)<=(void*)((unsigned long)str->address+str->mapping_size)) && (type & MEM_COMMIT)) { close(fd); diff --git a/src/post/goom/filters.c b/src/post/goom/filters.c index 26cb0e54c..1c4714b2f 100644 --- a/src/post/goom/filters.c +++ b/src/post/goom/filters.c @@ -740,7 +740,7 @@ static void zoomFilterVisualFXWrapper_apply (struct _VISUAL_FX *_this, Pixel *sr VisualFX zoomFilterVisualFXWrapper_create(void) { - VisualFX fx; + VisualFX fx = {0}; fx.init = zoomFilterVisualFXWrapper_init; fx.free = zoomFilterVisualFXWrapper_free; fx.apply = zoomFilterVisualFXWrapper_apply; diff --git a/src/post/goom/ifs.c b/src/post/goom/ifs.c index c51faae8b..af84b777b 100644 --- a/src/post/goom/ifs.c +++ b/src/post/goom/ifs.c @@ -762,7 +762,7 @@ static void ifs_vfx_free(VisualFX *_this) { } VisualFX ifs_visualfx_create(void) { - VisualFX vfx; + VisualFX vfx = {0}; vfx.init = ifs_vfx_init; vfx.free = ifs_vfx_free; vfx.apply = ifs_vfx_apply; diff --git a/src/post/goom/tentacle3d.c b/src/post/goom/tentacle3d.c index bfe73ae13..e1e2157e7 100755 --- a/src/post/goom/tentacle3d.c +++ b/src/post/goom/tentacle3d.c @@ -95,7 +95,7 @@ static void tentacle_fx_free(VisualFX *_this) { } VisualFX tentacle_fx_create(void) { - VisualFX fx; + VisualFX fx = {0}; fx.init = tentacle_fx_init; fx.apply = tentacle_fx_apply; fx.free = tentacle_fx_free; -- cgit v1.2.3