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);
|
||||
size = dmA->dmSize + CCHDEVICENAME + (Formname ? CCHFORMNAME : 0);
|
||||
MultiByteToWideChar(CP_ACP, 0, dmA->dmDeviceName, -1, dmW->dmDeviceName,
|
||||
CCHDEVICENAME);
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)dmA->dmDeviceName, -1,
|
||||
dmW->dmDeviceName, CCHDEVICENAME);
|
||||
if(!Formname) {
|
||||
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion,
|
||||
dmA->dmSize - CCHDEVICENAME);
|
||||
} else {
|
||||
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion,
|
||||
off_formname - CCHDEVICENAME);
|
||||
MultiByteToWideChar(CP_ACP, 0, dmA->dmFormName, -1, dmW->dmFormName,
|
||||
CCHFORMNAME);
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)dmA->dmFormName, -1,
|
||||
dmW->dmFormName, CCHFORMNAME);
|
||||
memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA->dmSize -
|
||||
(off_formname + CCHFORMNAME));
|
||||
}
|
||||
|
@ -798,16 +798,16 @@ static LPDEVMODEA DEVMODEdupWtoA(HANDLE heap, const DEVMODEW *dmW)
|
|||
Formname = (dmW->dmSize > off_formname);
|
||||
size = dmW->dmSize - CCHDEVICENAME - (Formname ? CCHFORMNAME : 0);
|
||||
dmA = HeapAlloc(heap, HEAP_ZERO_MEMORY, size + dmW->dmDriverExtra);
|
||||
WideCharToMultiByte(CP_ACP, 0, dmW->dmDeviceName, -1, dmA->dmDeviceName,
|
||||
CCHDEVICENAME, NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, dmW->dmDeviceName, -1,
|
||||
(LPSTR)dmA->dmDeviceName, CCHDEVICENAME, NULL, NULL);
|
||||
if(!Formname) {
|
||||
memcpy(&dmA->dmSpecVersion, &dmW->dmSpecVersion,
|
||||
dmW->dmSize - CCHDEVICENAME * sizeof(WCHAR));
|
||||
} else {
|
||||
memcpy(&dmA->dmSpecVersion, &dmW->dmSpecVersion,
|
||||
off_formname - CCHDEVICENAME * sizeof(WCHAR));
|
||||
WideCharToMultiByte(CP_ACP, 0, dmW->dmFormName, -1, dmA->dmFormName,
|
||||
CCHFORMNAME, NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, dmW->dmFormName, -1,
|
||||
(LPSTR)dmA->dmFormName, CCHFORMNAME, NULL, NULL);
|
||||
memcpy(&dmA->dmLogPixels, &dmW->dmLogPixels, dmW->dmSize -
|
||||
(off_formname + CCHFORMNAME * sizeof(WCHAR)));
|
||||
}
|
||||
|
@ -2237,10 +2237,11 @@ static void WINSPOOL_GetDefaultDevMode(
|
|||
BOOL unicode)
|
||||
{
|
||||
DEVMODEA dm;
|
||||
static const char szwps[] = "wineps.drv";
|
||||
|
||||
/* fill default DEVMODE - should be read from ppd... */
|
||||
ZeroMemory( &dm, sizeof(dm) );
|
||||
strcpy(dm.dmDeviceName,"wineps.drv");
|
||||
memcpy(dm.dmDeviceName,szwps,sizeof szwps);
|
||||
dm.dmSpecVersion = DM_SPECVERSION;
|
||||
dm.dmDriverVersion = 1;
|
||||
dm.dmSize = sizeof(DEVMODEA);
|
||||
|
@ -2972,8 +2973,8 @@ static BOOL WINSPOOL_GetDriverInfoFromReg(
|
|||
*pcbNeeded = WideCharToMultiByte(CP_ACP, 0, DriverName, -1, NULL, 0,
|
||||
NULL, NULL);
|
||||
if(*pcbNeeded <= cbBuf)
|
||||
WideCharToMultiByte(CP_ACP, 0, DriverName, -1, strPtr, *pcbNeeded,
|
||||
NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, DriverName, -1,
|
||||
(LPSTR)strPtr, *pcbNeeded, NULL, NULL);
|
||||
}
|
||||
if(Level == 1) {
|
||||
if(ptr)
|
||||
|
@ -3010,8 +3011,8 @@ static BOOL WINSPOOL_GetDriverInfoFromReg(
|
|||
if(unicode)
|
||||
strcpyW((LPWSTR)strPtr, pEnvironment);
|
||||
else
|
||||
WideCharToMultiByte(CP_ACP, 0, pEnvironment, -1, strPtr, size,
|
||||
NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, pEnvironment, -1,
|
||||
(LPSTR)strPtr, size, NULL, NULL);
|
||||
if(ptr)
|
||||
((PDRIVER_INFO_3W) ptr)->pEnvironment = (LPWSTR)strPtr;
|
||||
strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL;
|
||||
|
@ -3293,7 +3294,7 @@ BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR pName, LPSTR pEnvironment,
|
|||
if (ret) {
|
||||
DWORD needed;
|
||||
needed = 1 + WideCharToMultiByte( CP_ACP, 0, driverDirectoryW, -1,
|
||||
pDriverDirectory, cbBuf, NULL, NULL);
|
||||
(LPSTR)pDriverDirectory, cbBuf, NULL, NULL);
|
||||
if(pcbNeeded)
|
||||
*pcbNeeded = needed;
|
||||
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 */
|
||||
if ( ofs < bufsize )
|
||||
lstrcpynA(&buffer[ofs],portname,bufsize - ofs);
|
||||
lstrcpynA((LPSTR)&buffer[ofs],portname,bufsize - ofs);
|
||||
|
||||
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);
|
||||
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 FALSE;
|
||||
|
|
|
@ -231,7 +231,7 @@ char* convertHexToDWORDStr(BYTE *buf, ULONG bufLen)
|
|||
DWORD convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen)
|
||||
{
|
||||
char *s = str; /* Pointer to current */
|
||||
char *b = buf; /* Pointer to result */
|
||||
char *b = (char*) buf; /* Pointer to result */
|
||||
|
||||
ULONG strLen = strlen(str);
|
||||
ULONG strPos = 0;
|
||||
|
@ -408,7 +408,7 @@ HRESULT setValue(LPSTR val_name, LPSTR val_data)
|
|||
dwLen--;
|
||||
val_data[dwLen]='\0';
|
||||
}
|
||||
lpbData = val_data;
|
||||
lpbData = (BYTE*) val_data;
|
||||
} else if (dwParseType == REG_DWORD) /* Convert the dword types */
|
||||
{
|
||||
dwLen = convertHexToDWord(val_data, convert);
|
||||
|
@ -1195,7 +1195,7 @@ static void export_hkey(FILE *file, HKEY key,
|
|||
case REG_SZ:
|
||||
case REG_EXPAND_SZ:
|
||||
fputs("\"", file);
|
||||
REGPROC_export_string(file, *val_buf);
|
||||
REGPROC_export_string(file, (char*) *val_buf);
|
||||
fputs("\"\n", file);
|
||||
break;
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ static int enum_channel(HANDLE hProcess, EnumChannelCB ce, void* user, unsigned
|
|||
int i, ret = 1;
|
||||
unsigned int j;
|
||||
void* buf_addr;
|
||||
unsigned char buffer[32];
|
||||
char buffer[32];
|
||||
void* addr;
|
||||
const char** cache = NULL;
|
||||
unsigned num_cache, used_cache;
|
||||
|
|
|
@ -69,8 +69,8 @@ void WCMD_clear_screen (void) {
|
|||
if (GetConsoleScreenBufferInfo(hStdOut, &consoleInfo))
|
||||
{
|
||||
COORD topLeft;
|
||||
long screenSize;
|
||||
|
||||
DWORD screenSize;
|
||||
|
||||
screenSize = consoleInfo.dwSize.X * (consoleInfo.dwSize.Y + 1);
|
||||
|
||||
topLeft.X = 0;
|
||||
|
|
|
@ -496,7 +496,7 @@ static void init_msvcrt_io_block(STARTUPINFO* st)
|
|||
* it's new input & output handles)
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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);
|
||||
st->cbReserved2 = sz;
|
||||
st->lpReserved2 = ptr;
|
||||
|
||||
|
||||
#define WX_OPEN 0x01 /* see dlls/msvcrt/file.c */
|
||||
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_typecast(struct type_expr_t*, 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_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 i;
|
||||
int local_binding = FALSE;
|
||||
BOOL local_binding = FALSE;
|
||||
|
||||
for (i = 0; i < ndisplays; i++)
|
||||
if (displaypoints[i].exp == NULL)
|
||||
|
|
|
@ -770,7 +770,7 @@ int expr_print(const struct expr* exp)
|
|||
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;
|
||||
struct expr* rtn;
|
||||
|
|
|
@ -2083,7 +2083,7 @@ static BOOL gdb_startup(struct gdb_context* gdbctx, DEBUG_EVENT* de, unsigned fl
|
|||
{
|
||||
int sock;
|
||||
struct sockaddr_in s_addrs;
|
||||
int s_len = sizeof(s_addrs);
|
||||
unsigned int s_len = sizeof(s_addrs);
|
||||
struct pollfd pollfd;
|
||||
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;
|
||||
int i;
|
||||
char* str;
|
||||
unsigned char buffer[32];
|
||||
char buffer[32];
|
||||
unsigned char mask;
|
||||
int done = 0;
|
||||
BOOL bAll;
|
||||
|
|
Loading…
Reference in New Issue