Fixed a lot of warnings using WINE_UNUSED, casts, commenting out and

additional {}. Rewrote GetCreationModeFromSTGM so we don't get
"possible use of uninitialized variable".
This commit is contained in:
Marcus Meissner 1999-02-28 19:56:59 +00:00 committed by Alexandre Julliard
parent 0a74193782
commit de43ef45ec
12 changed files with 26 additions and 34 deletions

View file

@ -1717,7 +1717,7 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
}
if (resinfo & 1) { /* Pop-up? */
DWORD helpid = GET_DWORD(res); /* FIXME: use this. */
/* DWORD helpid = GET_DWORD(res); FIXME: use this. */
res += sizeof(DWORD);
mii.hSubMenu = CreatePopupMenu();
if (!mii.hSubMenu)

View file

@ -233,7 +233,7 @@ HOTKEY_SetFont (WND *wndPtr, WPARAM wParam, LPARAM lParam)
}
static LRESULT
static LRESULT WINE_UNUSED
HOTKEY_SysKeyDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
@ -262,7 +262,7 @@ HOTKEY_SysKeyDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
}
static LRESULT
static LRESULT WINE_UNUSED
HOTKEY_SysKeyUp (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */

View file

@ -313,14 +313,17 @@ static void
TOOLBAR_CalcToolbar (WND *wndPtr)
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
TBUTTON_INFO *btnPtr, *grpPtr;
INT i, j, nRows;
TBUTTON_INFO *btnPtr;
INT i, nRows;
INT x, y, cx, cy;
BOOL bWrap;
SIZE sizeString;
/* --- new --- */
#ifdef __NEW_WRAP_CODE__
INT nGrpCount = 0;
INT grpX;
INT grpX,j;
TBUTTON_INFO *grpPtr;
#endif
/* --- end new --- */
TOOLBAR_CalcStrings (wndPtr, &sizeString);

View file

@ -419,7 +419,7 @@ TREEVIEW_DrawItem (WND *wndPtr, HDC hdc, TREEVIEW_ITEM *wineItem)
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr);
INT oldBkMode,center,xpos,cx,cy, cditem, drawmode;
TREEVIEW_ITEM *parentItem;
COLORREF oldBkColor;
COLORREF oldBkColor = 0;
HFONT hOldFont;
UINT uTextJustify = DT_LEFT;
HPEN hOldPen, hnewPen;

View file

@ -821,11 +821,12 @@ HMODULE PE_LoadLibraryExA (LPCSTR name,
}
/* Now try the built-in even if disabled */
if ( builtin )
if ( builtin ) {
if ( (hModule32 = BUILTIN32_LoadImage( name, &ofs, TRUE )) )
WARN( module, "Could not load external DLL '%s', using built-in module.\n", name );
else
return 0;
}
/* Create 16-bit dummy module */

View file

@ -437,7 +437,7 @@ static void CallRMProc( CONTEXT *context, int iret )
}
static void WINAPI RMCallbackProc( RMCB *rmcb )
static void WINAPI WINE_UNUSED RMCallbackProc( RMCB *rmcb )
{
/* This routine should call DPMI_CallRMCBProc, but we don't have the
register structure available - this is easily fixed by going through

View file

@ -31,12 +31,6 @@
#define SOUND_DEV "/dev/dsp"
#define MIXER_DEV "/dev/mixer"
#ifdef SOUND_VERSION
#define IOCTL(a,b,c) ((-1==ioctl(a,b,&c))&&(perror("ioctl:"#b":"#c),0))
#else
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
#endif
#define MAX_WAVEOUTDRV (1)
#define MAX_WAVEINDRV (1)

View file

@ -1534,6 +1534,7 @@ BOOL WINAPI mciFreeCommandResource(UINT uTable)
UINT WINAPI mciLoadCommandResource(HANDLE hinst, LPCWSTR resname,UINT type)
{
FIXME(mmsys,"(%04x,%s,%d): stub!\n", hinst, debugstr_w(resname), type);
return 0;
}
const char* MCI_CommandToString(UINT16 wMsg)
@ -3381,7 +3382,7 @@ typedef struct {
/**************************************************************************
* MMSYSTEM_MidiStreamPlayer [internal]
*/
static void MMSYSTEM_MidiStreamPlayer(WINE_MIDIStream* ms)
static void WINE_UNUSED MMSYSTEM_MidiStreamPlayer(WINE_MIDIStream* ms)
{
/* FIXME: should I sleep a bit when there is no pending lpMidiHdr ?
* => provide a better synchronization system

View file

@ -868,7 +868,7 @@ BOOL WINAPI GetDCOrgEx( HDC hDC, LPPOINT lpp )
int w, h, border, depth;
/* FIXME: this is not correct for managed windows */
TSXGetGeometry( display, physDev->drawable, &root,
&lpp->x, &lpp->y, &w, &h, &border, &depth );
(int*)&lpp->x, (int*)&lpp->y, &w, &h, &border, &depth );
}
else lpp->x = lpp->y = 0;
lpp->x += dc->w.DCOrgX; lpp->y += dc->w.DCOrgY;

View file

@ -5213,21 +5213,14 @@ static DWORD GetAccessModeFromSTGM(DWORD stgm)
*/
static DWORD GetCreationModeFromSTGM(DWORD stgm)
{
DWORD dwCreationDistribution;
BOOL bSTGM_CREATE = ((stgm & STGM_CREATE) == STGM_CREATE);
BOOL bSTGM_CONVERT = ((stgm & STGM_CONVERT) == STGM_CONVERT);
BOOL bSTGM_FAILIFTHERE = ! (bSTGM_CREATE || bSTGM_CONVERT);
if (bSTGM_CREATE)
dwCreationDistribution = CREATE_ALWAYS;
else if (bSTGM_FAILIFTHERE)
dwCreationDistribution = CREATE_NEW;
else if (bSTGM_CONVERT)
{
if ( stgm & STGM_CREATE)
return CREATE_ALWAYS;
if (stgm & STGM_CONVERT) {
FIXME(ole, "STGM_CONVERT not implemented!\n");
dwCreationDistribution = CREATE_NEW;
return CREATE_NEW;
}
return dwCreationDistribution;
/* All other cases */
if (stgm & ~ (STGM_CREATE|STGM_CONVERT))
FIXME(ole,"unhandled storage mode : 0x%08lx\n",stgm & ~ (STGM_CREATE|STGM_CONVERT));
return CREATE_NEW;
}

View file

@ -28,7 +28,7 @@ static LPWINE_DRIVER lpDrvItemList = NULL;
/**************************************************************************
* LoadStartupDrivers [internal]
*/
static void DRIVER_LoadStartupDrivers(void)
static void WINE_UNUSED DRIVER_LoadStartupDrivers(void)
{
HDRVR16 hDrv;
char str[256];

View file

@ -1091,7 +1091,7 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
message queues.
*/
HTASK16 htask = (HTASK16) *plparam;
DWORD idThread = ((TDB*)GlobalLock16(htask))->thdb->server_tid;
DWORD idThread = (DWORD)((TDB*)GlobalLock16(htask))->thdb->server_tid;
*plparam = (LPARAM) idThread;
}
return 1;