Authors: Andreas Mohr <amohr@codeweavers.com>, Dimitrie O. Paun <dimi@cs.toronto.edu>, Patrik Stridvall <ps@leissner.se>
Various warning fixes.
This commit is contained in:
parent
704c67505d
commit
908464d448
|
@ -14,6 +14,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "winbase.h"
|
||||
#include "winnt.h"
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "winbase.h"
|
||||
#include "heap.h"
|
||||
|
@ -1182,7 +1183,7 @@ static INT LISTVIEW_GetItemHeight(HWND hwnd)
|
|||
}
|
||||
|
||||
|
||||
static void LISTVIEW_PrintSelectionRanges(hwnd)
|
||||
static void LISTVIEW_PrintSelectionRanges(HWND hwnd)
|
||||
{
|
||||
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0);
|
||||
LISTVIEW_SELECTION *selection;
|
||||
|
@ -1935,7 +1936,7 @@ static BOOL LISTVIEW_KeySelection(HWND hwnd, INT nItem)
|
|||
* over the item for a certain period of time.
|
||||
*
|
||||
*/
|
||||
static LRESULT LISTVIEW_MouseHover(hwnd, wParam, lParam)
|
||||
static LRESULT LISTVIEW_MouseHover(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0);
|
||||
POINT pt;
|
||||
|
@ -4113,7 +4114,7 @@ static LRESULT LISTVIEW_DeleteItem(HWND hwnd, INT nItem)
|
|||
* SUCCESS : HWND
|
||||
* FAILURE : 0
|
||||
*/
|
||||
static LRESULT LISTVIEW_GetEditControl(hwnd)
|
||||
static LRESULT LISTVIEW_GetEditControl(HWND hwnd)
|
||||
{
|
||||
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0);
|
||||
return infoPtr->hwndEdit;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "winbase.h"
|
||||
#include "windef.h"
|
||||
|
|
|
@ -1410,8 +1410,8 @@ TAB_DrawItemInterior
|
|||
HFONT hFont;
|
||||
HFONT hOldFont = 0; /* stop uninitialized warning */
|
||||
|
||||
INT nEscapement;
|
||||
INT nOrientation;
|
||||
INT nEscapement = 0; /* stop uninitialized warning */
|
||||
INT nOrientation = 0; /* stop uninitialized warning */
|
||||
INT iPointSize;
|
||||
|
||||
/* used to center the icon and text in the tab */
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/winestring.h"
|
||||
|
|
|
@ -423,7 +423,7 @@ HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
|
|||
}
|
||||
if ( IsEqualGUID( &IID_IDirectDraw7, refiid ) ) {
|
||||
IDirectDraw4Impl *dd = HeapAlloc(GetProcessHeap(),0,sizeof(*dd));
|
||||
ICOM_VTBL(dd) = &dga_dd7vt;dd->ref = 1;dd->d = This->d;This->d++;
|
||||
ICOM_VTBL(dd) = (ICOM_VTABLE(IDirectDraw4)*)&dga_dd7vt;dd->ref = 1;dd->d = This->d;This->d++;
|
||||
*obj = dd;
|
||||
|
||||
IDirectDraw7_AddRef(iface);
|
||||
|
|
|
@ -152,13 +152,13 @@ clean_up_and_exit:
|
|||
static XF86VidModeModeInfo *orig_mode = NULL;
|
||||
|
||||
void
|
||||
xf86vmode_setdisplaymode(width,height) {
|
||||
xf86vmode_setdisplaymode(DWORD width, DWORD height) {
|
||||
int i, mode_count;
|
||||
XF86VidModeModeInfo **all_modes, *vidmode = NULL;
|
||||
XF86VidModeModeLine mod_tmp;
|
||||
/* int dotclock_tmp; */
|
||||
|
||||
/* save original video mode and set fullscreen if available*/
|
||||
/* save original video mode and set fullscreen if available */
|
||||
orig_mode = (XF86VidModeModeInfo *)malloc(sizeof(XF86VidModeModeInfo));
|
||||
TSXF86VidModeGetModeLine(display, DefaultScreen(display), &orig_mode->dotclock, &mod_tmp);
|
||||
orig_mode->hdisplay = mod_tmp.hdisplay;
|
||||
|
@ -216,7 +216,7 @@ void xf86vmode_restore() {
|
|||
orig_mode = NULL;
|
||||
}
|
||||
#else
|
||||
void xf86vmode_setdisplaymode(width,height) {}
|
||||
void xf86vmode_setdisplaymode(DWORD width, DWORD height) {}
|
||||
void xf86vmode_restore() {}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
extern XF86VidModeModeInfo *orig_mode;
|
||||
#endif /* defined(HAVE_LIBXXF86VM) */
|
||||
|
||||
extern void xf86vmode_setdisplaymode(int,int);
|
||||
extern void xf86vmode_setdisplaymode(DWORD,DWORD);
|
||||
extern void xf86vmode_restore();
|
||||
|
||||
#ifdef HAVE_XVIDEO
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/times.h>
|
||||
#include "file.h"
|
||||
|
|
|
@ -92,8 +92,10 @@ void WINAPI WIN87_fpmath( CONTEXT86 *context )
|
|||
{
|
||||
case 0: /* install (increase instanceref) emulator, install NMI vector */
|
||||
RefCount++;
|
||||
#if 0
|
||||
if (Installed)
|
||||
/* InstallIntVecs02hAnd75h(); */ ;
|
||||
InstallIntVecs02hAnd75h();
|
||||
#endif
|
||||
WIN87_Init(context);
|
||||
AX_reg(context) = 0;
|
||||
break;
|
||||
|
@ -106,8 +108,11 @@ void WINAPI WIN87_fpmath( CONTEXT86 *context )
|
|||
* if zero. Every '0' call should have a matching '2' call.
|
||||
*/
|
||||
WIN87_Init(context);
|
||||
if (!(--RefCount) && (Installed))
|
||||
/* RestoreInt02h() */ ;
|
||||
RefCount--;
|
||||
#if 0
|
||||
if (!RefCount && Installed)
|
||||
RestoreInt02h();
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
|
|||
DrawDibEnd(hdd);
|
||||
|
||||
if (lpbi->biCompression) {
|
||||
DWORD size;
|
||||
DWORD size = 0;
|
||||
|
||||
whdd->hic = ICOpen(ICTYPE_VIDEO,lpbi->biCompression,ICMODE_DECOMPRESS);
|
||||
if (!whdd->hic) {
|
||||
|
@ -280,7 +280,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd,
|
|||
|
||||
whdd = GlobalLock16(hdd);
|
||||
|
||||
#define CHANGED(x) (whdd->##x != ##x)
|
||||
#define CHANGED(x) (whdd->x != x)
|
||||
|
||||
if ((!whdd->begun) || (!(wFlags & DDF_SAME_HDC) && CHANGED(hdc)) || (!(wFlags & DDF_SAME_DRAW) &&
|
||||
(CHANGED(lpbi) || CHANGED(dxSrc) || CHANGED(dySrc) || CHANGED(dxDst) || CHANGED(dyDst)))) {
|
||||
|
|
|
@ -3070,8 +3070,10 @@ HRESULT WINAPI VarDateFromR8(double dblIn, DATE* pdateOut)
|
|||
*/
|
||||
HRESULT WINAPI VarDateFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DATE* pdateOut)
|
||||
{
|
||||
HRESULT ret = S_OK;
|
||||
struct tm TM = { 0,0,0,0,0,0,0,0,0 };
|
||||
HRESULT ret = S_OK;
|
||||
struct tm TM;
|
||||
|
||||
memset( &TM, 0, sizeof(TM) );
|
||||
|
||||
TRACE("( %p, %lx, %lx, %p ), stub\n", strIn, lcid, dwFlags, pdateOut );
|
||||
|
||||
|
@ -3264,8 +3266,9 @@ HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut)
|
|||
*/
|
||||
HRESULT WINAPI VarBstrFromDate(DATE dateIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut)
|
||||
{
|
||||
struct tm TM = {0,0,0,0,0,0,0,0,0};
|
||||
|
||||
struct tm TM;
|
||||
memset( &TM, 0, sizeof(TM) );
|
||||
|
||||
TRACE("( %f, %ld, %ld, %p ), stub\n", dateIn, lcid, dwFlags, pbstrOut );
|
||||
|
||||
if( DateToTm( dateIn, lcid, &TM ) == FALSE )
|
||||
|
|
|
@ -88,7 +88,7 @@ RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath)
|
|||
|
||||
RETERR16 WINAPI vcpOpen16(LPWORD p1, LPWORD p2)
|
||||
{
|
||||
FIXME("(%p, %p, stub.\n", p1, p2);
|
||||
FIXME("(%p, %p), stub.\n", p1, p2);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -686,7 +686,10 @@ BOOL WINAPI FileMenu_DeleteItemByCmd (HMENU hMenu, UINT uID)
|
|||
mii.fMask = MIIM_SUBMENU;
|
||||
|
||||
GetMenuItemInfoA(hMenu, uID, FALSE, &mii );
|
||||
if ( mii.hSubMenu );
|
||||
if ( mii.hSubMenu )
|
||||
{
|
||||
/* FIXME: Do what? */
|
||||
}
|
||||
|
||||
DeleteMenu(hMenu, MF_BYCOMMAND, uID);
|
||||
return TRUE;
|
||||
|
@ -706,7 +709,10 @@ BOOL WINAPI FileMenu_DeleteItemByIndex ( HMENU hMenu, UINT uPos)
|
|||
mii.fMask = MIIM_SUBMENU;
|
||||
|
||||
GetMenuItemInfoA(hMenu, uPos, TRUE, &mii );
|
||||
if ( mii.hSubMenu );
|
||||
if ( mii.hSubMenu )
|
||||
{
|
||||
/* FIXME: Do what? */
|
||||
}
|
||||
|
||||
DeleteMenu(hMenu, MF_BYPOSITION, uPos);
|
||||
return TRUE;
|
||||
|
|
|
@ -194,7 +194,7 @@ static BOOL DoPaste(
|
|||
|
||||
TRACE("\n");
|
||||
|
||||
if(SUCCEEDED(pOleGetClipboard(&pda)));
|
||||
if(SUCCEEDED(pOleGetClipboard(&pda)))
|
||||
{
|
||||
STGMEDIUM medium;
|
||||
FORMATETC formatetc;
|
||||
|
|
|
@ -927,7 +927,9 @@ static BOOL LFD_ComposeLFD( const fontObject* fo,
|
|||
sprintf(resy_string, "%d", resy);
|
||||
}
|
||||
else
|
||||
; /* FIXME - synth width */
|
||||
{
|
||||
/* FIXME - synth width */
|
||||
}
|
||||
}
|
||||
aLFD.resolution_y = resy_string;
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ static void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
|
|||
entry = (ET_ENTRY *)((BYTE *)bundle+6);
|
||||
while (num_entries--)
|
||||
{
|
||||
/*TRACE(module, "entry: %p, entry->segnum: %d, entry->offs: %04x\n", entry, entry->segnum, entry->offs);*/
|
||||
/*TRACE_(module)("entry: %p, entry->segnum: %d, entry->offs: %04x\n", entry, entry->segnum, entry->offs);*/
|
||||
if (entry->segnum == segnum)
|
||||
{
|
||||
pFunc = ((BYTE *)pSeg+entry->offs);
|
||||
|
|
|
@ -168,7 +168,7 @@ VOID WINAPI GetSystemInfo(
|
|||
}
|
||||
if (!strncasecmp(line,"processor",strlen("processor"))) {
|
||||
/* processor number counts up...*/
|
||||
int x;
|
||||
unsigned int x;
|
||||
|
||||
if (sscanf(value,"%d",&x))
|
||||
if (x+1>cachedsi.dwNumberOfProcessors)
|
||||
|
|
16
misc/error.c
16
misc/error.c
|
@ -97,11 +97,11 @@ static const struct {
|
|||
static const char *GetErrorString(UINT16 uErr)
|
||||
{
|
||||
static char buffer[80];
|
||||
int i;
|
||||
unsigned int n;
|
||||
|
||||
for (i = 0; i < ErrorStringCount; i++) {
|
||||
if (uErr == ErrorStrings[i].constant)
|
||||
return ErrorStrings[i].name;
|
||||
for (n = 0; n < ErrorStringCount; n++) {
|
||||
if (uErr == ErrorStrings[n].constant)
|
||||
return ErrorStrings[n].name;
|
||||
}
|
||||
|
||||
sprintf(buffer, "%x", uErr);
|
||||
|
@ -122,11 +122,11 @@ static const char *GetParamErrorString(UINT16 uErr) {
|
|||
buffer[0] = '\0';
|
||||
|
||||
{
|
||||
int i;
|
||||
unsigned int n;
|
||||
|
||||
for (i = 0; i < ParamErrorStringCount; i++) {
|
||||
if (uErr == ParamErrorStrings[i].constant) {
|
||||
strcat(buffer, ParamErrorStrings[i].name);
|
||||
for (n = 0; n < ParamErrorStringCount; n++) {
|
||||
if (uErr == ParamErrorStrings[n].constant) {
|
||||
strcat(buffer, ParamErrorStrings[n].name);
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,15 +225,15 @@ static void parse_options( char *argv[] )
|
|||
static void inherit_options( char *buffer )
|
||||
{
|
||||
char *argv[256];
|
||||
int i;
|
||||
unsigned int n;
|
||||
|
||||
char *p = strtok( buffer, " \t" );
|
||||
for (i = 0; i < sizeof(argv)/sizeof(argv[0])-1 && p; i++)
|
||||
for (n = 0; n < sizeof(argv)/sizeof(argv[0])-1 && p; n++)
|
||||
{
|
||||
argv[i] = p;
|
||||
argv[n] = p;
|
||||
p = strtok( NULL, " \t" );
|
||||
}
|
||||
argv[i] = NULL;
|
||||
argv[n] = NULL;
|
||||
parse_options( argv );
|
||||
if (argv[0]) /* an option remains */
|
||||
{
|
||||
|
|
|
@ -706,7 +706,7 @@ error: ERR("error reading lf block\n");
|
|||
static int _nt_parse_nk(HKEY hkey, char * base, nt_nk * nk, int level)
|
||||
{
|
||||
char * name;
|
||||
int i;
|
||||
unsigned int n;
|
||||
DWORD * vl;
|
||||
HKEY subkey = hkey;
|
||||
|
||||
|
@ -740,9 +740,9 @@ static int _nt_parse_nk(HKEY hkey, char * base, nt_nk * nk, int level)
|
|||
|
||||
/* loop trough the value list */
|
||||
vl = (DWORD *)(base+nk->valuelist_off+4);
|
||||
for (i=0; i<nk->nr_values; i++)
|
||||
for (n=0; n<nk->nr_values; n++)
|
||||
{
|
||||
nt_vk * vk = (nt_vk*)(base+vl[i]+4);
|
||||
nt_vk * vk = (nt_vk*)(base+vl[n]+4);
|
||||
if (!_nt_parse_vk(subkey, base, vk)) goto error1;
|
||||
}
|
||||
|
||||
|
@ -1306,7 +1306,7 @@ void _w31_loadreg(void) {
|
|||
struct _w31_header head;
|
||||
struct _w31_tabent *tab;
|
||||
unsigned char *txt;
|
||||
int len;
|
||||
unsigned int len;
|
||||
OFSTRUCT ofs;
|
||||
BY_HANDLE_FILE_INFORMATION hfinfo;
|
||||
time_t lastmodified;
|
||||
|
@ -1470,7 +1470,7 @@ void SHELL_LoadRegistry( void )
|
|||
/* test %windir%/system32/config/system --> winnt */
|
||||
strcpy(path, windir);
|
||||
strncat(path, "\\system32\\config\\system", MAX_PATHNAME_LEN - strlen(path) - 1);
|
||||
if(GetFileAttributesA(path) != -1)
|
||||
if(GetFileAttributesA(path) != (DWORD)-1)
|
||||
{
|
||||
systemtype = REG_WINNT;
|
||||
}
|
||||
|
@ -1479,7 +1479,7 @@ void SHELL_LoadRegistry( void )
|
|||
/* test %windir%/system.dat --> win95 */
|
||||
strcpy(path, windir);
|
||||
strncat(path, "\\system.dat", MAX_PATHNAME_LEN - strlen(path) - 1);
|
||||
if(GetFileAttributesA(path) != -1)
|
||||
if(GetFileAttributesA(path) != (DWORD)-1)
|
||||
{
|
||||
systemtype = REG_WIN95;
|
||||
}
|
||||
|
@ -1616,7 +1616,7 @@ void SHELL_LoadRegistry( void )
|
|||
if (PROFILE_GetWineIniBool("registry", "LoadHomeRegistryFiles", 1))
|
||||
{
|
||||
const char *confdir = get_config_dir();
|
||||
int len = strlen(confdir) + 20;
|
||||
unsigned int len = strlen(confdir) + 20;
|
||||
char *fn = path;
|
||||
|
||||
if (len > sizeof(path)) fn = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
|
|
|
@ -439,7 +439,7 @@ void DOSDEV_InstallDOSDevices(void)
|
|||
{
|
||||
DOS_DATASEG *dataseg;
|
||||
UINT16 seg;
|
||||
int n;
|
||||
unsigned int n;
|
||||
|
||||
/* allocate DOS data segment or something */
|
||||
DOS_LOLSeg = GlobalDOSAlloc16(sizeof(DOS_DATASEG));
|
||||
|
|
|
@ -221,9 +221,8 @@ void VGA_WriteChars(unsigned X,unsigned Y,unsigned ch,int attr,int count)
|
|||
void CALLBACK VGA_Poll( ULONG_PTR arg )
|
||||
{
|
||||
char *dat;
|
||||
unsigned Pitch,Height,Width;
|
||||
unsigned int Pitch,Height,Width,Y,X;
|
||||
char *surf;
|
||||
int Y,X;
|
||||
|
||||
if (!InterlockedExchangeAdd(&vga_polling, 1)) {
|
||||
/* FIXME: optimize by doing this only if the data has actually changed
|
||||
|
|
18
msdos/vxd.c
18
msdos/vxd.c
|
@ -48,7 +48,7 @@ void WINAPI VXD_VMM ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] VMM \n", (UINT16)service);
|
||||
TRACE("[%04x] VMM\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ void WINAPI VXD_Reboot ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] VMM \n", (UINT16)service);
|
||||
TRACE("[%04x] Reboot\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -142,7 +142,7 @@ void WINAPI VXD_VDD ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] VDD \n", (UINT16)service);
|
||||
TRACE("[%04x] VDD\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ void WINAPI VXD_VMD ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] VMD \n", (UINT16)service);
|
||||
TRACE("[%04x] VMD\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -380,7 +380,7 @@ void WINAPI VXD_TimerAPI ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] TimerAPI \n", (UINT16)service);
|
||||
TRACE("[%04x] TimerAPI\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ void WINAPI VXD_ConfigMG ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] ConfigMG \n", (UINT16)service);
|
||||
TRACE("[%04x] ConfigMG\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ void WINAPI VXD_Enable ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] Enable \n", (UINT16)service);
|
||||
TRACE("[%04x] Enable\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -455,7 +455,7 @@ void WINAPI VXD_APM ( CONTEXT86 *context )
|
|||
{
|
||||
unsigned service = AX_reg(context);
|
||||
|
||||
TRACE("[%04x] APM \n", (UINT16)service);
|
||||
TRACE("[%04x] APM\n", (UINT16)service);
|
||||
|
||||
switch(service)
|
||||
{
|
||||
|
@ -753,7 +753,7 @@ void WINAPI VXD_Win32s( CONTEXT86 *context )
|
|||
IMAGE_SECTION_HEADER *pe_seg = PE_SECTIONS(module->baseAddr);
|
||||
|
||||
HFILE image = _lopen(module->pathName, OF_READ);
|
||||
BOOL error = (image == INVALID_HANDLE_VALUE);
|
||||
BOOL error = (image == HFILE_ERROR);
|
||||
UINT i;
|
||||
|
||||
TRACE("MapModule: Loading %s\n", module->pathName);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "winbase.h"
|
||||
#include "bitmap.h"
|
||||
#include "callback.h"
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef struct tagSNOOP_DLL {
|
|||
HMODULE hmod;
|
||||
SNOOP_FUN *funs;
|
||||
LPCSTR name;
|
||||
int nrofordinals;
|
||||
DWORD nrofordinals;
|
||||
struct tagSNOOP_DLL *next;
|
||||
} SNOOP_DLL;
|
||||
typedef struct tagSNOOP_RETURNENTRY {
|
||||
|
@ -192,7 +192,7 @@ SNOOP_GetProcAddress(HMODULE hmod,LPCSTR name,DWORD ordinal,FARPROC origfun) {
|
|||
return origfun;
|
||||
if (!SNOOP_ShowDebugmsgSnoop(dll->name,ordinal,name))
|
||||
return origfun;
|
||||
assert(ordinal<dll->nrofordinals);
|
||||
assert(ordinal < dll->nrofordinals);
|
||||
fun = dll->funs+ordinal;
|
||||
if (!fun->name) fun->name = HEAP_strdupA(GetProcessHeap(),0,name);
|
||||
fun->lcall = 0xe8;
|
||||
|
|
|
@ -41,7 +41,7 @@ PDB current_process;
|
|||
|
||||
static char **main_exe_argv;
|
||||
static char main_exe_name[MAX_PATH];
|
||||
static HFILE main_exe_file = INVALID_HANDLE_VALUE;
|
||||
static HANDLE main_exe_file = INVALID_HANDLE_VALUE;
|
||||
|
||||
unsigned int server_startticks;
|
||||
|
||||
|
@ -740,7 +740,7 @@ BOOL PROCESS_Create( HFILE hFile, LPCSTR filename, LPSTR cmd_line, LPCSTR env,
|
|||
const char *unixfilename = NULL;
|
||||
const char *unixdir = NULL;
|
||||
DOS_FULL_NAME full_name;
|
||||
HANDLE load_done_evt = -1;
|
||||
HANDLE load_done_evt = (HANDLE)-1;
|
||||
|
||||
info->hThread = info->hProcess = INVALID_HANDLE_VALUE;
|
||||
|
||||
|
@ -824,7 +824,7 @@ BOOL PROCESS_Create( HFILE hFile, LPCSTR filename, LPSTR cmd_line, LPCSTR env,
|
|||
if (!ret || (pid == -1)) goto error;
|
||||
|
||||
/* Wait until process is initialized (or initialization failed) */
|
||||
if (load_done_evt != -1)
|
||||
if (load_done_evt != (HANDLE)-1)
|
||||
{
|
||||
DWORD res;
|
||||
HANDLE handles[2];
|
||||
|
@ -845,7 +845,7 @@ BOOL PROCESS_Create( HFILE hFile, LPCSTR filename, LPSTR cmd_line, LPCSTR env,
|
|||
return TRUE;
|
||||
|
||||
error:
|
||||
if (load_done_evt != -1) CloseHandle( load_done_evt );
|
||||
if (load_done_evt != (HANDLE)-1) CloseHandle( load_done_evt );
|
||||
if (info->hThread != INVALID_HANDLE_VALUE) CloseHandle( info->hThread );
|
||||
if (info->hProcess != INVALID_HANDLE_VALUE) CloseHandle( info->hProcess );
|
||||
return FALSE;
|
||||
|
@ -941,16 +941,16 @@ DWORD WINAPI GetProcessDword( DWORD dwProcessID, INT offset )
|
|||
|
||||
case GPD_STARTF_SIZE:
|
||||
x = current_startupinfo.dwXSize;
|
||||
if ( x == CW_USEDEFAULT ) x = CW_USEDEFAULT16;
|
||||
if ( (INT)x == CW_USEDEFAULT ) x = CW_USEDEFAULT16;
|
||||
y = current_startupinfo.dwYSize;
|
||||
if ( y == CW_USEDEFAULT ) y = CW_USEDEFAULT16;
|
||||
if ( (INT)y == CW_USEDEFAULT ) y = CW_USEDEFAULT16;
|
||||
return MAKELONG( x, y );
|
||||
|
||||
case GPD_STARTF_POSITION:
|
||||
x = current_startupinfo.dwX;
|
||||
if ( x == CW_USEDEFAULT ) x = CW_USEDEFAULT16;
|
||||
if ( (INT)x == CW_USEDEFAULT ) x = CW_USEDEFAULT16;
|
||||
y = current_startupinfo.dwY;
|
||||
if ( y == CW_USEDEFAULT ) y = CW_USEDEFAULT16;
|
||||
if ( (INT)y == CW_USEDEFAULT ) y = CW_USEDEFAULT16;
|
||||
return MAKELONG( x, y );
|
||||
|
||||
case GPD_STARTF_FLAGS:
|
||||
|
@ -1168,7 +1168,7 @@ BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,DWORD minset,
|
|||
DWORD maxset)
|
||||
{
|
||||
FIXME("(0x%08x,%ld,%ld): stub - harmless\n",hProcess,minset,maxset);
|
||||
if(( minset == -1) && (maxset == -1)) {
|
||||
if(( minset == (DWORD)-1) && (maxset == (DWORD)-1)) {
|
||||
/* Trim the working set to zero */
|
||||
/* Swap the process out of physical RAM */
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ HANDLE WINAPI CreateWaitableTimerA( SECURITY_ATTRIBUTES *sa, BOOL manual, LPCSTR
|
|||
ret = req->handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if (ret == -1) ret = 0; /* must return 0 on failure, not -1 */
|
||||
if (ret == INVALID_HANDLE_VALUE) ret = 0; /* must return 0 on failure, not -1 */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ HANDLE WINAPI CreateWaitableTimerW( SECURITY_ATTRIBUTES *sa, BOOL manual, LPCWST
|
|||
ret = req->handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if (ret == -1) ret = 0; /* must return 0 on failure, not -1 */
|
||||
if (ret == INVALID_HANDLE_VALUE) ret = 0; /* must return 0 on failure, not -1 */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ HANDLE WINAPI OpenWaitableTimerA( DWORD access, BOOL inherit, LPCSTR name )
|
|||
ret = req->handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if (ret == -1) ret = 0; /* must return 0 on failure, not -1 */
|
||||
if (ret == INVALID_HANDLE_VALUE) ret = 0; /* must return 0 on failure, not -1 */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ HANDLE WINAPI OpenWaitableTimerW( DWORD access, BOOL inherit, LPCWSTR name )
|
|||
ret = req->handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if (ret == -1) ret = 0; /* must return 0 on failure, not -1 */
|
||||
if (ret == INVALID_HANDLE_VALUE) ret = 0; /* must return 0 on failure, not -1 */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ static int find_atom( struct atom_table *table, const WCHAR *str )
|
|||
static size_t get_atom_name( struct atom_table *table, int atom,
|
||||
WCHAR *str, size_t maxsize, int *count )
|
||||
{
|
||||
int len = 0;
|
||||
size_t len = 0;
|
||||
struct atom_entry *entry = get_atom_entry( table, atom );
|
||||
*count = -1;
|
||||
if (entry)
|
||||
|
|
|
@ -55,7 +55,7 @@ static const struct object_ops mapping_ops =
|
|||
/* These are always the same on an i386, and it will be faster this way */
|
||||
# define page_mask 0xfff
|
||||
# define page_shift 12
|
||||
# define init_page_size() /* nothing */
|
||||
# define init_page_size() do { /* nothing */ } while(0)
|
||||
|
||||
#else /* __i386__ */
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ static const struct object_ops master_socket_ops =
|
|||
|
||||
|
||||
struct thread *current = NULL; /* thread handling the current request */
|
||||
int global_error = 0; /* global error code for when no thread is current */
|
||||
unsigned int global_error = 0; /* global error code for when no thread is current */
|
||||
|
||||
static struct master_socket *master_socket; /* the master socket object */
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ struct thread
|
|||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
struct thread_apc *apc_head; /* queue of async procedure calls */
|
||||
struct thread_apc *apc_tail; /* queue of async procedure calls */
|
||||
int error; /* current error code */
|
||||
unsigned int error; /* current error code */
|
||||
int pass_fd; /* fd to pass to the client */
|
||||
enum run_state state; /* running state */
|
||||
int attached; /* is thread attached with ptrace? */
|
||||
|
@ -108,10 +108,10 @@ extern int read_thread_int( struct thread *thread, const int *addr, int *data );
|
|||
extern int write_thread_int( struct thread *thread, int *addr, int data, unsigned int mask );
|
||||
extern void *get_thread_ip( struct thread *thread );
|
||||
|
||||
extern int global_error; /* global error code for when no thread is current */
|
||||
extern unsigned int global_error; /* global error code for when no thread is current */
|
||||
|
||||
static inline int get_error(void) { return current ? current->error : global_error; }
|
||||
static inline void set_error( int err ) { global_error = err; if (current) current->error = err; }
|
||||
static inline unsigned int get_error(void) { return current ? current->error : global_error; }
|
||||
static inline void set_error( unsigned int err ) { global_error = err; if (current) current->error = err; }
|
||||
static inline void clear_error(void) { set_error(0); }
|
||||
|
||||
static inline void *get_thread_id( struct thread *thread ) { return thread; }
|
||||
|
|
|
@ -93,8 +93,8 @@ static int mapvkey_1[256]={
|
|||
};
|
||||
|
||||
/* FIXME: Should be in an internal header file. OK, so which one?
|
||||
Used by CONSOLE_makecomplex. */
|
||||
int wine_openpty(int *master, int *slave, char *name,
|
||||
Used by CONSOLE_make_complex. */
|
||||
extern int wine_openpty(int *master, int *slave, char *name,
|
||||
struct termios *term, struct winsize *winsize);
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -553,7 +553,7 @@ BOOL WINAPI FreeConsole(VOID)
|
|||
* This makes simple commandline tools pipeable, while complex commandline
|
||||
* tools work without getting messed up by debugoutput.
|
||||
*
|
||||
* All other functions should work indedependend from this call.
|
||||
* All other functions should work independent from this call.
|
||||
*
|
||||
* To test for complex console: pid == 0 -> simple, otherwise complex.
|
||||
*/
|
||||
|
@ -1002,7 +1002,7 @@ BOOL WINAPI ReadConsoleA( HANDLE hConsoleInput,
|
|||
LPDWORD lpNumberOfCharsRead,
|
||||
LPVOID lpReserved )
|
||||
{
|
||||
int charsread = 0;
|
||||
DWORD charsread = 0;
|
||||
LPSTR xbuf = (LPSTR)lpBuffer;
|
||||
|
||||
TRACE("(%d,%p,%ld,%p,%p)\n",
|
||||
|
@ -1462,7 +1462,7 @@ BOOL WINAPI FillConsoleOutputCharacterA(
|
|||
COORD dwCoord,
|
||||
LPDWORD lpNumCharsWritten)
|
||||
{
|
||||
long count;
|
||||
DWORD count;
|
||||
DWORD xlen;
|
||||
|
||||
SetConsoleCursorPosition(hConsoleOutput,dwCoord);
|
||||
|
@ -1493,7 +1493,7 @@ BOOL WINAPI FillConsoleOutputCharacterW(HANDLE hConsoleOutput,
|
|||
COORD dwCoord,
|
||||
LPDWORD lpNumCharsWritten)
|
||||
{
|
||||
long count;
|
||||
DWORD count;
|
||||
DWORD xlen;
|
||||
|
||||
SetConsoleCursorPosition(hConsoleOutput,dwCoord);
|
||||
|
|
|
@ -859,8 +859,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
hwndPreInitFocus = GetFocus();
|
||||
if (SendMessageA( hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param ))
|
||||
{
|
||||
/* check where the focus is again, some controls status might have changed in
|
||||
WM_INITDIALOG */
|
||||
/* check where the focus is again,
|
||||
* some controls status might have changed in WM_INITDIALOG */
|
||||
dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
|
||||
SetFocus( dlgInfo->hwndFocus );
|
||||
}
|
||||
|
@ -1334,10 +1334,10 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
|
|||
/***********************************************************************
|
||||
* DIALOG_FindMsgDestination
|
||||
*
|
||||
* The messages that IsDialogMessage send may not go to the dialog
|
||||
* The messages that IsDialogMessage sends may not go to the dialog
|
||||
* calling IsDialogMessage if that dialog is a child, and it has the
|
||||
* DS_CONTROL style set.
|
||||
* We propagate up until we hit a that does not have DS_CONTROL, or
|
||||
* We propagate up until we hit one that does not have DS_CONTROL, or
|
||||
* whose parent is not a dialog.
|
||||
*
|
||||
* This is undocumented behaviour.
|
||||
|
@ -1966,7 +1966,8 @@ HWND WINAPI GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl,
|
|||
|
||||
if(hwndCtrl)
|
||||
{
|
||||
/* if the hwndCtrl is the child of the control in the hwndDlg then the hwndDlg has to be the parent of the hwndCtrl */
|
||||
/* if the hwndCtrl is the child of the control in the hwndDlg,
|
||||
* then the hwndDlg has to be the parent of the hwndCtrl */
|
||||
if(GetParent(hwndCtrl) != hwndDlg && GetParent(GetParent(hwndCtrl)) == hwndDlg)
|
||||
hwndDlg = GetParent(hwndCtrl);
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
@ -291,7 +292,7 @@ BOOL X11DRV_CLIPBOARD_LaunchServer()
|
|||
TRACE("Waiting for clipboard server to acquire selection\n");
|
||||
|
||||
if ( WaitForSingleObject( selectionClearEvent, 60000 ) != WAIT_OBJECT_0 )
|
||||
TRACE("Server could not acquire selection, or a time out occured!\n");
|
||||
TRACE("Server could not acquire selection, or a timeout occurred!\n");
|
||||
else
|
||||
TRACE("Server successfully acquired selection\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue