Fix gcc 4.0 warnings.
This commit is contained in:
parent
2386023474
commit
516a577df1
|
@ -764,16 +764,16 @@ static LPDEVMODEW DEVMODEcpyAtoW(DEVMODEW *dmW, const DEVMODEA *dmA)
|
||||||
|
|
||||||
Formname = (dmA->dmSize > off_formname);
|
Formname = (dmA->dmSize > off_formname);
|
||||||
size = dmA->dmSize + CCHDEVICENAME + (Formname ? CCHFORMNAME : 0);
|
size = dmA->dmSize + CCHDEVICENAME + (Formname ? CCHFORMNAME : 0);
|
||||||
MultiByteToWideChar(CP_ACP, 0, dmA->dmDeviceName, -1, dmW->dmDeviceName,
|
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)dmA->dmDeviceName, -1,
|
||||||
CCHDEVICENAME);
|
dmW->dmDeviceName, CCHDEVICENAME);
|
||||||
if(!Formname) {
|
if(!Formname) {
|
||||||
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion,
|
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion,
|
||||||
dmA->dmSize - CCHDEVICENAME);
|
dmA->dmSize - CCHDEVICENAME);
|
||||||
} else {
|
} else {
|
||||||
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion,
|
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion,
|
||||||
off_formname - CCHDEVICENAME);
|
off_formname - CCHDEVICENAME);
|
||||||
MultiByteToWideChar(CP_ACP, 0, dmA->dmFormName, -1, dmW->dmFormName,
|
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)dmA->dmFormName, -1,
|
||||||
CCHFORMNAME);
|
dmW->dmFormName, CCHFORMNAME);
|
||||||
memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA->dmSize -
|
memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA->dmSize -
|
||||||
(off_formname + CCHFORMNAME));
|
(off_formname + CCHFORMNAME));
|
||||||
}
|
}
|
||||||
|
@ -798,16 +798,16 @@ static LPDEVMODEA DEVMODEdupWtoA(HANDLE heap, const DEVMODEW *dmW)
|
||||||
Formname = (dmW->dmSize > off_formname);
|
Formname = (dmW->dmSize > off_formname);
|
||||||
size = dmW->dmSize - CCHDEVICENAME - (Formname ? CCHFORMNAME : 0);
|
size = dmW->dmSize - CCHDEVICENAME - (Formname ? CCHFORMNAME : 0);
|
||||||
dmA = HeapAlloc(heap, HEAP_ZERO_MEMORY, size + dmW->dmDriverExtra);
|
dmA = HeapAlloc(heap, HEAP_ZERO_MEMORY, size + dmW->dmDriverExtra);
|
||||||
WideCharToMultiByte(CP_ACP, 0, dmW->dmDeviceName, -1, dmA->dmDeviceName,
|
WideCharToMultiByte(CP_ACP, 0, dmW->dmDeviceName, -1,
|
||||||
CCHDEVICENAME, NULL, NULL);
|
(LPSTR)dmA->dmDeviceName, CCHDEVICENAME, NULL, NULL);
|
||||||
if(!Formname) {
|
if(!Formname) {
|
||||||
memcpy(&dmA->dmSpecVersion, &dmW->dmSpecVersion,
|
memcpy(&dmA->dmSpecVersion, &dmW->dmSpecVersion,
|
||||||
dmW->dmSize - CCHDEVICENAME * sizeof(WCHAR));
|
dmW->dmSize - CCHDEVICENAME * sizeof(WCHAR));
|
||||||
} else {
|
} else {
|
||||||
memcpy(&dmA->dmSpecVersion, &dmW->dmSpecVersion,
|
memcpy(&dmA->dmSpecVersion, &dmW->dmSpecVersion,
|
||||||
off_formname - CCHDEVICENAME * sizeof(WCHAR));
|
off_formname - CCHDEVICENAME * sizeof(WCHAR));
|
||||||
WideCharToMultiByte(CP_ACP, 0, dmW->dmFormName, -1, dmA->dmFormName,
|
WideCharToMultiByte(CP_ACP, 0, dmW->dmFormName, -1,
|
||||||
CCHFORMNAME, NULL, NULL);
|
(LPSTR)dmA->dmFormName, CCHFORMNAME, NULL, NULL);
|
||||||
memcpy(&dmA->dmLogPixels, &dmW->dmLogPixels, dmW->dmSize -
|
memcpy(&dmA->dmLogPixels, &dmW->dmLogPixels, dmW->dmSize -
|
||||||
(off_formname + CCHFORMNAME * sizeof(WCHAR)));
|
(off_formname + CCHFORMNAME * sizeof(WCHAR)));
|
||||||
}
|
}
|
||||||
|
@ -2237,10 +2237,11 @@ static void WINSPOOL_GetDefaultDevMode(
|
||||||
BOOL unicode)
|
BOOL unicode)
|
||||||
{
|
{
|
||||||
DEVMODEA dm;
|
DEVMODEA dm;
|
||||||
|
static const char szwps[] = "wineps.drv";
|
||||||
|
|
||||||
/* fill default DEVMODE - should be read from ppd... */
|
/* fill default DEVMODE - should be read from ppd... */
|
||||||
ZeroMemory( &dm, sizeof(dm) );
|
ZeroMemory( &dm, sizeof(dm) );
|
||||||
strcpy(dm.dmDeviceName,"wineps.drv");
|
memcpy(dm.dmDeviceName,szwps,sizeof szwps);
|
||||||
dm.dmSpecVersion = DM_SPECVERSION;
|
dm.dmSpecVersion = DM_SPECVERSION;
|
||||||
dm.dmDriverVersion = 1;
|
dm.dmDriverVersion = 1;
|
||||||
dm.dmSize = sizeof(DEVMODEA);
|
dm.dmSize = sizeof(DEVMODEA);
|
||||||
|
@ -2972,8 +2973,8 @@ static BOOL WINSPOOL_GetDriverInfoFromReg(
|
||||||
*pcbNeeded = WideCharToMultiByte(CP_ACP, 0, DriverName, -1, NULL, 0,
|
*pcbNeeded = WideCharToMultiByte(CP_ACP, 0, DriverName, -1, NULL, 0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if(*pcbNeeded <= cbBuf)
|
if(*pcbNeeded <= cbBuf)
|
||||||
WideCharToMultiByte(CP_ACP, 0, DriverName, -1, strPtr, *pcbNeeded,
|
WideCharToMultiByte(CP_ACP, 0, DriverName, -1,
|
||||||
NULL, NULL);
|
(LPSTR)strPtr, *pcbNeeded, NULL, NULL);
|
||||||
}
|
}
|
||||||
if(Level == 1) {
|
if(Level == 1) {
|
||||||
if(ptr)
|
if(ptr)
|
||||||
|
@ -3010,8 +3011,8 @@ static BOOL WINSPOOL_GetDriverInfoFromReg(
|
||||||
if(unicode)
|
if(unicode)
|
||||||
strcpyW((LPWSTR)strPtr, pEnvironment);
|
strcpyW((LPWSTR)strPtr, pEnvironment);
|
||||||
else
|
else
|
||||||
WideCharToMultiByte(CP_ACP, 0, pEnvironment, -1, strPtr, size,
|
WideCharToMultiByte(CP_ACP, 0, pEnvironment, -1,
|
||||||
NULL, NULL);
|
(LPSTR)strPtr, size, NULL, NULL);
|
||||||
if(ptr)
|
if(ptr)
|
||||||
((PDRIVER_INFO_3W) ptr)->pEnvironment = (LPWSTR)strPtr;
|
((PDRIVER_INFO_3W) ptr)->pEnvironment = (LPWSTR)strPtr;
|
||||||
strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL;
|
strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL;
|
||||||
|
@ -3293,7 +3294,7 @@ BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR pName, LPSTR pEnvironment,
|
||||||
if (ret) {
|
if (ret) {
|
||||||
DWORD needed;
|
DWORD needed;
|
||||||
needed = 1 + WideCharToMultiByte( CP_ACP, 0, driverDirectoryW, -1,
|
needed = 1 + WideCharToMultiByte( CP_ACP, 0, driverDirectoryW, -1,
|
||||||
pDriverDirectory, cbBuf, NULL, NULL);
|
(LPSTR)pDriverDirectory, cbBuf, NULL, NULL);
|
||||||
if(pcbNeeded)
|
if(pcbNeeded)
|
||||||
*pcbNeeded = needed;
|
*pcbNeeded = needed;
|
||||||
ret = (needed <= cbBuf) ? TRUE : FALSE;
|
ret = (needed <= cbBuf) ? TRUE : FALSE;
|
||||||
|
@ -3789,7 +3790,7 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE buffer,DWORD bufsize,
|
||||||
|
|
||||||
/* add the name of the port if we can fit it */
|
/* add the name of the port if we can fit it */
|
||||||
if ( ofs < bufsize )
|
if ( ofs < bufsize )
|
||||||
lstrcpynA(&buffer[ofs],portname,bufsize - ofs);
|
lstrcpynA((LPSTR)&buffer[ofs],portname,bufsize - ofs);
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
@ -4911,7 +4912,7 @@ static BOOL string_to_buf(LPCWSTR str, LPBYTE ptr, DWORD cb, DWORD *size, BOOL u
|
||||||
*size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
*size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||||
if(*size <= cb)
|
if(*size <= cb)
|
||||||
{
|
{
|
||||||
WideCharToMultiByte(CP_ACP, 0, str, -1, ptr, *size, NULL, NULL);
|
WideCharToMultiByte(CP_ACP, 0, str, -1, (LPSTR)ptr, *size, NULL, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -231,7 +231,7 @@ char* convertHexToDWORDStr(BYTE *buf, ULONG bufLen)
|
||||||
DWORD convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen)
|
DWORD convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen)
|
||||||
{
|
{
|
||||||
char *s = str; /* Pointer to current */
|
char *s = str; /* Pointer to current */
|
||||||
char *b = buf; /* Pointer to result */
|
char *b = (char*) buf; /* Pointer to result */
|
||||||
|
|
||||||
ULONG strLen = strlen(str);
|
ULONG strLen = strlen(str);
|
||||||
ULONG strPos = 0;
|
ULONG strPos = 0;
|
||||||
|
@ -408,7 +408,7 @@ HRESULT setValue(LPSTR val_name, LPSTR val_data)
|
||||||
dwLen--;
|
dwLen--;
|
||||||
val_data[dwLen]='\0';
|
val_data[dwLen]='\0';
|
||||||
}
|
}
|
||||||
lpbData = val_data;
|
lpbData = (BYTE*) val_data;
|
||||||
} else if (dwParseType == REG_DWORD) /* Convert the dword types */
|
} else if (dwParseType == REG_DWORD) /* Convert the dword types */
|
||||||
{
|
{
|
||||||
dwLen = convertHexToDWord(val_data, convert);
|
dwLen = convertHexToDWord(val_data, convert);
|
||||||
|
@ -1195,7 +1195,7 @@ static void export_hkey(FILE *file, HKEY key,
|
||||||
case REG_SZ:
|
case REG_SZ:
|
||||||
case REG_EXPAND_SZ:
|
case REG_EXPAND_SZ:
|
||||||
fputs("\"", file);
|
fputs("\"", file);
|
||||||
REGPROC_export_string(file, *val_buf);
|
REGPROC_export_string(file, (char*) *val_buf);
|
||||||
fputs("\"\n", file);
|
fputs("\"\n", file);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ static int enum_channel(HANDLE hProcess, EnumChannelCB ce, void* user, unsigned
|
||||||
int i, ret = 1;
|
int i, ret = 1;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
void* buf_addr;
|
void* buf_addr;
|
||||||
unsigned char buffer[32];
|
char buffer[32];
|
||||||
void* addr;
|
void* addr;
|
||||||
const char** cache = NULL;
|
const char** cache = NULL;
|
||||||
unsigned num_cache, used_cache;
|
unsigned num_cache, used_cache;
|
||||||
|
|
|
@ -69,8 +69,8 @@ void WCMD_clear_screen (void) {
|
||||||
if (GetConsoleScreenBufferInfo(hStdOut, &consoleInfo))
|
if (GetConsoleScreenBufferInfo(hStdOut, &consoleInfo))
|
||||||
{
|
{
|
||||||
COORD topLeft;
|
COORD topLeft;
|
||||||
long screenSize;
|
DWORD screenSize;
|
||||||
|
|
||||||
screenSize = consoleInfo.dwSize.X * (consoleInfo.dwSize.Y + 1);
|
screenSize = consoleInfo.dwSize.X * (consoleInfo.dwSize.Y + 1);
|
||||||
|
|
||||||
topLeft.X = 0;
|
topLeft.X = 0;
|
||||||
|
|
|
@ -496,7 +496,7 @@ static void init_msvcrt_io_block(STARTUPINFO* st)
|
||||||
* it's new input & output handles)
|
* it's new input & output handles)
|
||||||
*/
|
*/
|
||||||
size_t sz = max(sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * 3, st_p.cbReserved2);
|
size_t sz = max(sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * 3, st_p.cbReserved2);
|
||||||
char* ptr = HeapAlloc(GetProcessHeap(), 0, sz);
|
BYTE* ptr = HeapAlloc(GetProcessHeap(), 0, sz);
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
unsigned num = *(unsigned*)st_p.lpReserved2;
|
unsigned num = *(unsigned*)st_p.lpReserved2;
|
||||||
|
@ -506,7 +506,7 @@ static void init_msvcrt_io_block(STARTUPINFO* st)
|
||||||
memcpy(ptr, st_p.lpReserved2, st_p.cbReserved2);
|
memcpy(ptr, st_p.lpReserved2, st_p.cbReserved2);
|
||||||
st->cbReserved2 = sz;
|
st->cbReserved2 = sz;
|
||||||
st->lpReserved2 = ptr;
|
st->lpReserved2 = ptr;
|
||||||
|
|
||||||
#define WX_OPEN 0x01 /* see dlls/msvcrt/file.c */
|
#define WX_OPEN 0x01 /* see dlls/msvcrt/file.c */
|
||||||
if (num <= 0 || (flags[0] & WX_OPEN))
|
if (num <= 0 || (flags[0] & WX_OPEN))
|
||||||
{
|
{
|
||||||
|
|
|
@ -297,7 +297,7 @@ extern struct expr* expr_alloc_struct(struct expr*, const char* element);
|
||||||
extern struct expr* expr_alloc_func_call(const char*, int nargs, ...);
|
extern struct expr* expr_alloc_func_call(const char*, int nargs, ...);
|
||||||
extern struct expr* expr_alloc_typecast(struct type_expr_t*, struct expr*);
|
extern struct expr* expr_alloc_typecast(struct type_expr_t*, struct expr*);
|
||||||
extern struct dbg_lvalue expr_eval(struct expr*);
|
extern struct dbg_lvalue expr_eval(struct expr*);
|
||||||
extern struct expr* expr_clone(const struct expr* exp, unsigned* local_binding);
|
extern struct expr* expr_clone(const struct expr* exp, BOOL *local_binding);
|
||||||
extern int expr_free(struct expr* exp);
|
extern int expr_free(struct expr* exp);
|
||||||
extern int expr_print(const struct expr* exp);
|
extern int expr_print(const struct expr* exp);
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ static inline BOOL cmp_symbol(const SYMBOL_INFO* si1, const SYMBOL_INFO* si2)
|
||||||
int display_add(struct expr *exp, int count, char format)
|
int display_add(struct expr *exp, int count, char format)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int local_binding = FALSE;
|
BOOL local_binding = FALSE;
|
||||||
|
|
||||||
for (i = 0; i < ndisplays; i++)
|
for (i = 0; i < ndisplays; i++)
|
||||||
if (displaypoints[i].exp == NULL)
|
if (displaypoints[i].exp == NULL)
|
||||||
|
|
|
@ -770,7 +770,7 @@ int expr_print(const struct expr* exp)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct expr* expr_clone(const struct expr* exp, unsigned* local_binding)
|
struct expr* expr_clone(const struct expr* exp, BOOL *local_binding)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct expr* rtn;
|
struct expr* rtn;
|
||||||
|
|
|
@ -2083,7 +2083,7 @@ static BOOL gdb_startup(struct gdb_context* gdbctx, DEBUG_EVENT* de, unsigned fl
|
||||||
{
|
{
|
||||||
int sock;
|
int sock;
|
||||||
struct sockaddr_in s_addrs;
|
struct sockaddr_in s_addrs;
|
||||||
int s_len = sizeof(s_addrs);
|
unsigned int s_len = sizeof(s_addrs);
|
||||||
struct pollfd pollfd;
|
struct pollfd pollfd;
|
||||||
IMAGEHLP_MODULE imh_mod;
|
IMAGEHLP_MODULE imh_mod;
|
||||||
|
|
||||||
|
|
|
@ -692,7 +692,7 @@ void info_wine_dbg_channel(BOOL turn_on, const char* chnl, const char* name)
|
||||||
struct dll_option_layout dol;
|
struct dll_option_layout dol;
|
||||||
int i;
|
int i;
|
||||||
char* str;
|
char* str;
|
||||||
unsigned char buffer[32];
|
char buffer[32];
|
||||||
unsigned char mask;
|
unsigned char mask;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
BOOL bAll;
|
BOOL bAll;
|
||||||
|
|
Loading…
Reference in New Issue