diff options
author | wm4 <wm4@mplayer2.org> | 2012-02-27 19:15:13 +0100 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-03-01 00:22:30 +0200 |
commit | 24be34f1e9e37111a06108c090324426aff6f1db (patch) | |
tree | aa28674a6d69dfb18fd102608f72e3081df6d1dd /loader/wine | |
parent | 25417a626d0b9077bfbb940952f3858d7b8b549b (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 'loader/wine')
-rw-r--r-- | loader/wine/winbase.h | 4 | ||||
-rw-r--r-- | loader/wine/windef.h | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/loader/wine/winbase.h b/loader/wine/winbase.h index 19394bc81d..b5c5ebe25c 100644 --- a/loader/wine/winbase.h +++ b/loader/wine/winbase.h @@ -786,8 +786,8 @@ typedef struct tagSYSTEM_INFO struct { WORD wProcessorArchitecture; WORD wReserved; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; + } s; + } u; DWORD dwPageSize; LPVOID lpMinimumApplicationAddress; LPVOID lpMaximumApplicationAddress; diff --git a/loader/wine/windef.h b/loader/wine/windef.h index b46607969b..ee455dc3f8 100644 --- a/loader/wine/windef.h +++ b/loader/wine/windef.h @@ -47,6 +47,8 @@ # define NONAMELESSUNION #endif /* !defined(NONAMELESSUNION) */ +#if 0 + #ifndef NONAMELESSSTRUCT #define DUMMYSTRUCTNAME #define DUMMYSTRUCTNAME1 @@ -79,6 +81,8 @@ #define DUMMYUNIONNAME5 u5 #endif /* !defined(NONAMELESSUNION) */ +#endif + /* Calling conventions definitions */ #ifdef __i386__ @@ -301,8 +305,8 @@ typedef LRESULT CALLBACK (*DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM); typedef INT CALLBACK (*EDITWORDBREAKPROCA)(LPSTR,INT,INT,INT); typedef INT CALLBACK (*EDITWORDBREAKPROCW)(LPWSTR,INT,INT,INT); DECL_WINELIB_TYPE_AW(EDITWORDBREAKPROC) -typedef LRESULT CALLBACK (*FARPROC)(); -typedef INT CALLBACK (*PROC)(); +typedef LRESULT CALLBACK (*FARPROC)(void); +typedef INT CALLBACK (*PROC)(void); typedef WIN_BOOL CALLBACK (*GRAYSTRINGPROC)(HDC,LPARAM,INT); typedef LRESULT CALLBACK (*HOOKPROC)(INT,WPARAM,LPARAM); typedef WIN_BOOL CALLBACK (*PROPENUMPROCA)(HWND,LPCSTR,HANDLE); @@ -434,8 +438,8 @@ typedef struct typedef LRESULT CALLBACK (*DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM); typedef WIN_BOOL16 CALLBACK (*DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM); typedef INT16 CALLBACK (*EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16); -typedef LRESULT CALLBACK (*FARPROC16)(); -typedef INT16 CALLBACK (*PROC16)(); +typedef LRESULT CALLBACK (*FARPROC16)(void); +typedef INT16 CALLBACK (*PROC16)(void); typedef WIN_BOOL16 CALLBACK (*GRAYSTRINGPROC16)(HDC16,LPARAM,INT16); typedef LRESULT CALLBACK (*HOOKPROC16)(INT16,WPARAM16,LPARAM); typedef WIN_BOOL16 CALLBACK (*PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16); |