aboutsummaryrefslogtreecommitdiffhomepage
path: root/osdep
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@mplayer2.org>2012-02-27 19:15:13 +0100
committerGravatar Uoti Urpala <uau@mplayer2.org>2012-03-01 00:22:30 +0200
commit24be34f1e9e37111a06108c090324426aff6f1db (patch)
treeaa28674a6d69dfb18fd102608f72e3081df6d1dd /osdep
parent25417a626d0b9077bfbb940952f3858d7b8b549b (diff)
cleanup: Silence compilation warnings on MinGW-w64
Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/getch2-win.c4
-rw-r--r--osdep/setenv.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c
index 0b4d2b0bae..3e6eeff086 100644
--- a/osdep/getch2-win.c
+++ b/osdep/getch2-win.c
@@ -77,7 +77,7 @@ static int getch2_internal(void)
/*check if there are input events*/
if(!GetNumberOfConsoleInputEvents(in,&retval))
{
- printf("getch2: can't get number of input events: %i\n",GetLastError());
+ printf("getch2: can't get number of input events: %i\n",(int)GetLastError());
return -1;
}
if(retval<=0)return -1;
@@ -165,7 +165,7 @@ void getch2_enable(void)
in = GetStdHandle(STD_INPUT_HANDLE);
if(!GetNumberOfConsoleInputEvents(in,&retval))
{
- printf("getch2: %i can't get number of input events [disabling console input]\n",GetLastError());
+ printf("getch2: %i can't get number of input events [disabling console input]\n",(int)GetLastError());
getch2_status = 0;
}
else getch2_status=1;
diff --git a/osdep/setenv.c b/osdep/setenv.c
index 9919fff2a3..222d3ba82b 100644
--- a/osdep/setenv.c
+++ b/osdep/setenv.c
@@ -24,6 +24,8 @@
#include <string.h>
#include <assert.h>
+int setenv(const char *name, const char *val, int overwrite);
+
int setenv(const char *name, const char *val, int overwrite)
{
int len = strlen(name) + strlen(val) + 2;