Commit 0ee98cc3 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Fixed ANSI C violations.

parent 0e06d623
...@@ -1362,7 +1362,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) ...@@ -1362,7 +1362,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
iExt = CBGetCurSel(fodInfos->DlgInfos.hwndFileTypeCB); iExt = CBGetCurSel(fodInfos->DlgInfos.hwndFileTypeCB);
lpOrg = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, iExt); lpOrg = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, iExt);
if ((int)lpOrg == -1) if ((int)lpOrg == -1)
lpOrg = NULL; // we get -1 if the filetype LB is empty lpOrg = NULL; /* we get -1 if the filetype LB is empty */
lpstrExt = lpOrg; lpstrExt = lpOrg;
......
...@@ -740,7 +740,7 @@ HRESULT DPL_CreateAddress( ...@@ -740,7 +740,7 @@ HRESULT DPL_CreateAddress(
BOOL bAnsiInterface ) BOOL bAnsiInterface )
{ {
const DWORD dwNumAddElements = 2; /* Service Provide & address data type */ const DWORD dwNumAddElements = 2; /* Service Provide & address data type */
DPCOMPOUNDADDRESSELEMENT addressElements[ dwNumAddElements ]; DPCOMPOUNDADDRESSELEMENT addressElements[ 2 /* dwNumAddElements */ ];
TRACE( "(%p)->(%p,%p,0x%08lx,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize, TRACE( "(%p)->(%p,%p,0x%08lx,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize,
lpAddress, lpdwAddressSize, bAnsiInterface ); lpAddress, lpdwAddressSize, bAnsiInterface );
...@@ -817,7 +817,7 @@ static HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, L ...@@ -817,7 +817,7 @@ static HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, L
} }
dwSizeThisEnumeration = sizeof( DPADDRESS ) + lpElements->dwDataSize; dwSizeThisEnumeration = sizeof( DPADDRESS ) + lpElements->dwDataSize;
lpAddress += dwSizeThisEnumeration; lpAddress = (char *) lpAddress + dwSizeThisEnumeration;
dwTotalSizeEnumerated += dwSizeThisEnumeration; dwTotalSizeEnumerated += dwSizeThisEnumeration;
} }
...@@ -1589,10 +1589,10 @@ HRESULT DPL_CreateCompoundAddress ...@@ -1589,10 +1589,10 @@ HRESULT DPL_CreateCompoundAddress
lpdpAddress->guidDataType = DPAID_TotalSize; lpdpAddress->guidDataType = DPAID_TotalSize;
lpdpAddress->dwDataSize = sizeof( DWORD ); lpdpAddress->dwDataSize = sizeof( DWORD );
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
*(LPDWORD)lpAddress = dwSizeRequired; *(LPDWORD)lpAddress = dwSizeRequired;
lpAddress += sizeof( DWORD ); lpAddress = (char *) lpAddress + sizeof( DWORD );
} }
/* Calculate the size of the buffer required */ /* Calculate the size of the buffer required */
...@@ -1608,10 +1608,10 @@ HRESULT DPL_CreateCompoundAddress ...@@ -1608,10 +1608,10 @@ HRESULT DPL_CreateCompoundAddress
lpdpAddress->guidDataType = lpElements->guidDataType; lpdpAddress->guidDataType = lpElements->guidDataType;
lpdpAddress->dwDataSize = sizeof( GUID ); lpdpAddress->dwDataSize = sizeof( GUID );
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
*((LPGUID)lpAddress) = *((LPGUID)lpElements->lpData); *((LPGUID)lpAddress) = *((LPGUID)lpElements->lpData);
lpAddress += sizeof( GUID ); lpAddress = (char *) lpAddress + sizeof( GUID );
} }
else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) || else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) ||
( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) ||
...@@ -1622,12 +1622,12 @@ HRESULT DPL_CreateCompoundAddress ...@@ -1622,12 +1622,12 @@ HRESULT DPL_CreateCompoundAddress
lpdpAddress->guidDataType = lpElements->guidDataType; lpdpAddress->guidDataType = lpElements->guidDataType;
lpdpAddress->dwDataSize = lpElements->dwDataSize; lpdpAddress->dwDataSize = lpElements->dwDataSize;
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
lstrcpynA( (LPSTR)lpAddress, lstrcpynA( (LPSTR)lpAddress,
(LPCSTR)lpElements->lpData, (LPCSTR)lpElements->lpData,
lpElements->dwDataSize ); lpElements->dwDataSize );
lpAddress += lpElements->dwDataSize; lpAddress = (char *) lpAddress + lpElements->dwDataSize;
} }
else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) || else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) ||
( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) || ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) ||
...@@ -1638,12 +1638,12 @@ HRESULT DPL_CreateCompoundAddress ...@@ -1638,12 +1638,12 @@ HRESULT DPL_CreateCompoundAddress
lpdpAddress->guidDataType = lpElements->guidDataType; lpdpAddress->guidDataType = lpElements->guidDataType;
lpdpAddress->dwDataSize = lpElements->dwDataSize; lpdpAddress->dwDataSize = lpElements->dwDataSize;
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
lstrcpynW( (LPWSTR)lpAddress, lstrcpynW( (LPWSTR)lpAddress,
(LPCWSTR)lpElements->lpData, (LPCWSTR)lpElements->lpData,
lpElements->dwDataSize ); lpElements->dwDataSize );
lpAddress += lpElements->dwDataSize * sizeof( WCHAR ); lpAddress = (char *) lpAddress + lpElements->dwDataSize * sizeof( WCHAR );
} }
else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) ) else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) )
{ {
...@@ -1651,10 +1651,10 @@ HRESULT DPL_CreateCompoundAddress ...@@ -1651,10 +1651,10 @@ HRESULT DPL_CreateCompoundAddress
lpdpAddress->guidDataType = lpElements->guidDataType; lpdpAddress->guidDataType = lpElements->guidDataType;
lpdpAddress->dwDataSize = lpElements->dwDataSize; lpdpAddress->dwDataSize = lpElements->dwDataSize;
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
*((LPWORD)lpAddress) = *((LPWORD)lpElements->lpData); *((LPWORD)lpAddress) = *((LPWORD)lpElements->lpData);
lpAddress += sizeof( WORD ); lpAddress = (char *) lpAddress + sizeof( WORD );
} }
else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) ) else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) )
{ {
...@@ -1662,10 +1662,10 @@ HRESULT DPL_CreateCompoundAddress ...@@ -1662,10 +1662,10 @@ HRESULT DPL_CreateCompoundAddress
lpdpAddress->guidDataType = lpElements->guidDataType; lpdpAddress->guidDataType = lpElements->guidDataType;
lpdpAddress->dwDataSize = lpElements->dwDataSize; lpdpAddress->dwDataSize = lpElements->dwDataSize;
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
memcpy( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) ); memcpy( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) );
lpAddress += sizeof( DPADDRESS ); lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
} }
} }
......
...@@ -302,8 +302,8 @@ DWORD WINAPI IcmpSendEcho( ...@@ -302,8 +302,8 @@ DWORD WINAPI IcmpSendEcho(
timeout.tv_usec=(Timeout % 1000)*1000; timeout.tv_usec=(Timeout % 1000)*1000;
addrlen=sizeof(addr); addrlen=sizeof(addr);
ier=ReplyBuffer; ier=ReplyBuffer;
ip_header=ReplyBuffer+sizeof(ICMP_ECHO_REPLY); ip_header=(struct ip *) ((char *) ReplyBuffer+sizeof(ICMP_ECHO_REPLY));
endbuf=ReplyBuffer+ReplySize; endbuf=(char *) ReplyBuffer+ReplySize;
maxlen=ReplySize-sizeof(ICMP_ECHO_REPLY); maxlen=ReplySize-sizeof(ICMP_ECHO_REPLY);
/* Send the packet */ /* Send the packet */
...@@ -457,7 +457,7 @@ DWORD WINAPI IcmpSendEcho( ...@@ -457,7 +457,7 @@ DWORD WINAPI IcmpSendEcho(
ier->Options.Flags=ip_header->ip_off >> 13; ier->Options.Flags=ip_header->ip_off >> 13;
ier->Options.OptionsSize=ip_header_len-sizeof(struct ip); ier->Options.OptionsSize=ip_header_len-sizeof(struct ip);
if (ier->Options.OptionsSize!=0) { if (ier->Options.OptionsSize!=0) {
ier->Options.OptionsData=ier->Data-ier->Options.OptionsSize; ier->Options.OptionsData=(unsigned char *) ier->Data-ier->Options.OptionsSize;
/* FIXME: We are supposed to rearrange the option's 'source route' data */ /* FIXME: We are supposed to rearrange the option's 'source route' data */
memmove(ier->Options.OptionsData,((char*)ip_header)+ip_header_len,ier->Options.OptionsSize); memmove(ier->Options.OptionsData,((char*)ip_header)+ip_header_len,ier->Options.OptionsSize);
endbuf=ier->Options.OptionsData; endbuf=ier->Options.OptionsData;
......
...@@ -283,7 +283,7 @@ NTSTATUS WINAPI NtEnumerateKey( ...@@ -283,7 +283,7 @@ NTSTATUS WINAPI NtEnumerateKey(
DOSFS_UnixTimeToFileTime(req->modif, &kni->LastWriteTime, 0); DOSFS_UnixTimeToFileTime(req->modif, &kni->LastWriteTime, 0);
kni->TitleIndex = 0; kni->TitleIndex = 0;
memcpy (kni->Name, req->name, kni->NameLength); memcpy (kni->Name, req->name, kni->NameLength);
if (kni->ClassLength) memcpy (KeyInformation+kni->ClassOffset, req->class, kni->ClassLength); if (kni->ClassLength) memcpy ((char *) KeyInformation + kni->ClassOffset, req->class, kni->ClassLength);
} }
break; break;
default: default:
...@@ -347,7 +347,7 @@ NTSTATUS WINAPI NtQueryKey( ...@@ -347,7 +347,7 @@ NTSTATUS WINAPI NtQueryKey(
kfi->Values = req->values; kfi->Values = req->values;
kfi->MaxValueNameLen = req->max_value; kfi->MaxValueNameLen = req->max_value;
kfi->MaxValueDataLen = req->max_data; kfi->MaxValueDataLen = req->max_data;
if(kfi->ClassLength) memcpy (KeyInformation+kfi->ClassOffset, req->class, kfi->ClassLength); if(kfi->ClassLength) memcpy ((char *) KeyInformation + kfi->ClassOffset, req->class, kfi->ClassLength);
} }
break; break;
case KeyNodeInformation: case KeyNodeInformation:
...@@ -364,7 +364,7 @@ NTSTATUS WINAPI NtQueryKey( ...@@ -364,7 +364,7 @@ NTSTATUS WINAPI NtQueryKey(
DOSFS_UnixTimeToFileTime(req->modif, &kni->LastWriteTime, 0); DOSFS_UnixTimeToFileTime(req->modif, &kni->LastWriteTime, 0);
kni->TitleIndex = 0; kni->TitleIndex = 0;
memcpy (kni->Name, req->name, kni->NameLength); memcpy (kni->Name, req->name, kni->NameLength);
if(kni->ClassLength) memcpy (KeyInformation+kni->ClassOffset, req->class, kni->ClassLength); if(kni->ClassLength) memcpy ((char *) KeyInformation + kni->ClassOffset, req->class, kni->ClassLength);
} }
break; break;
default: default:
...@@ -568,7 +568,7 @@ NTSTATUS WINAPI NtQueryValueKey( ...@@ -568,7 +568,7 @@ NTSTATUS WINAPI NtQueryValueKey(
kfi->NameLength = 0; kfi->NameLength = 0;
kfi->DataOffset = DataOffset; kfi->DataOffset = DataOffset;
kfi->DataLength = req->len; kfi->DataLength = req->len;
memcpy(KeyValueInformation+DataOffset, req->data, req->len); memcpy((char *) KeyValueInformation + DataOffset, req->data, req->len);
} }
break; break;
case KeyValuePartialInformation: case KeyValuePartialInformation:
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define _WINDOWS #define _WINDOWS
#endif #endif
typedef char* GUID; //This definition is in sqltypes.h, but if _WINDOWS is defined, this is skipped. typedef char* GUID; /* This definition is in sqltypes.h, but if _WINDOWS is defined, this is skipped. */
#include "sql.h" #include "sql.h"
#include "sqltypes.h" #include "sqltypes.h"
......
...@@ -531,7 +531,7 @@ static TYPEDESC stndTypeDesc[VT_LPWSTR+1]={/* VT_LPWSTR is largest type that */ ...@@ -531,7 +531,7 @@ static TYPEDESC stndTypeDesc[VT_LPWSTR+1]={/* VT_LPWSTR is largest type that */
static void TLB_abort() static void TLB_abort()
{ {
*((int *)0)=0; DebugBreak();
} }
static void * TLB_Alloc(unsigned size) static void * TLB_Alloc(unsigned size)
{ {
......
...@@ -195,8 +195,9 @@ void WINAPI SHChangeNotifyA (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVO ...@@ -195,8 +195,9 @@ void WINAPI SHChangeNotifyA (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVO
void WINAPI SHChangeNotifyAW (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2) void WINAPI SHChangeNotifyAW (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
{ {
if(VERSION_OsIsUnicode()) if(VERSION_OsIsUnicode())
return SHChangeNotifyW (wEventId, uFlags, dwItem1, dwItem2); SHChangeNotifyW (wEventId, uFlags, dwItem1, dwItem2);
return SHChangeNotifyA (wEventId, uFlags, dwItem1, dwItem2); else
SHChangeNotifyA (wEventId, uFlags, dwItem1, dwItem2);
} }
/************************************************************************* /*************************************************************************
......
...@@ -422,19 +422,19 @@ DWORD WINAPI SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,LPCSTR path) { ...@@ -422,19 +422,19 @@ DWORD WINAPI SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,LPCSTR path) {
DWORD WINAPI SHFree(LPVOID x) DWORD WINAPI SHFree(LPVOID x)
{ {
#if MEM_DEBUG #if MEM_DEBUG
WORD len = *(LPWORD)(x-2); WORD len = *(LPWORD)((LPBYTE)x-2);
if ( *(LPWORD)(x+len) != 0x7384) if ( *(LPWORD)((LPBYTE)x+len) != 0x7384)
ERR("MAGIC2!\n"); ERR("MAGIC2!\n");
if ( (*(LPWORD)(x-4)) != 0x8271) if ( (*(LPWORD)((LPBYTE)x-4)) != 0x8271)
ERR("MAGIC1!\n"); ERR("MAGIC1!\n");
else else
memset(x-4, 0xde, len+6); memset((LPBYTE)x-4, 0xde, len+6);
TRACE("%p len=%u\n",x, len); TRACE("%p len=%u\n",x, len);
x -= 4; x = (LPBYTE) x - 4;
#else #else
TRACE("%p\n",x); TRACE("%p\n",x);
#endif #endif
......
...@@ -92,7 +92,7 @@ static HMODULE16 BUILTIN_DoLoadModule16( const BUILTIN16_DESCRIPTOR *descr ) ...@@ -92,7 +92,7 @@ static HMODULE16 BUILTIN_DoLoadModule16( const BUILTIN16_DESCRIPTOR *descr )
memcpy( (LPBYTE)pModule, descr->module_start, res_off ); memcpy( (LPBYTE)pModule, descr->module_start, res_off );
memcpy( (LPBYTE)pModule + res_off, rsrc->res_start, rsrc->res_size ); memcpy( (LPBYTE)pModule + res_off, rsrc->res_start, rsrc->res_size );
memcpy( (LPBYTE)pModule + res_off + rsrc->res_size, memcpy( (LPBYTE)pModule + res_off + rsrc->res_size,
descr->module_start + res_off, descr->module_size - res_off ); (LPBYTE)descr->module_start + res_off, descr->module_size - res_off );
/* Have to fix up various pModule-based near pointers. Ugh! */ /* Have to fix up various pModule-based near pointers. Ugh! */
pModule->name_table += rsrc->res_size; pModule->name_table += rsrc->res_size;
......
...@@ -244,19 +244,19 @@ typedef struct tagDPADDRESS ...@@ -244,19 +244,19 @@ typedef struct tagDPADDRESS
/* Used for specification of a communication port. Baud rate, stop bits and /* Used for specification of a communication port. Baud rate, stop bits and
* parity bits can be found in winbase.h. These are flow control constants only. * parity bits can be found in winbase.h. These are flow control constants only.
*/ */
#define DPCPA_NOFLOW 0 // no flow control #define DPCPA_NOFLOW 0 /* no flow control */
#define DPCPA_XONXOFFFLOW 1 // software flow control #define DPCPA_XONXOFFFLOW 1 /* software flow control */
#define DPCPA_RTSFLOW 2 // hardware flow control with RTS #define DPCPA_RTSFLOW 2 /* hardware flow control with RTS */
#define DPCPA_DTRFLOW 3 // hardware flow control with DTR #define DPCPA_DTRFLOW 3 /* hardware flow control with DTR */
#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR #define DPCPA_RTSDTRFLOW 4 /* hardware flow control with RTS and DTR */
typedef struct tagDPCOMPORTADDRESS typedef struct tagDPCOMPORTADDRESS
{ {
DWORD dwComPort; // COM port to use (1-4) DWORD dwComPort; /* COM port to use (1-4) */
DWORD dwBaudRate; // baud rate (100-256k) DWORD dwBaudRate; /* baud rate (100-256k) */
DWORD dwStopBits; // no. stop bits (1-2) DWORD dwStopBits; /* no. stop bits (1-2) */
DWORD dwParity; // parity (none, odd, even, mark) DWORD dwParity; /* parity (none, odd, even, mark) */
DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr) DWORD dwFlowControl; /* flow control (none, xon/xoff, rts, dtr) */
} DPCOMPORTADDRESS, *LPDPCOMPORTADDRESS; } DPCOMPORTADDRESS, *LPDPCOMPORTADDRESS;
......
...@@ -24,7 +24,7 @@ typedef UINT16 *LPUINT16; ...@@ -24,7 +24,7 @@ typedef UINT16 *LPUINT16;
typedef HANDLE16 a##16; \ typedef HANDLE16 a##16; \
typedef a##16 *P##a##16; \ typedef a##16 *P##a##16; \
typedef a##16 *NP##a##16; \ typedef a##16 *NP##a##16; \
typedef a##16 *LP##a##16; typedef a##16 *LP##a##16
DECLARE_HANDLE16(HACMDRIVERID); DECLARE_HANDLE16(HACMDRIVERID);
DECLARE_HANDLE16(HACMDRIVER); DECLARE_HANDLE16(HACMDRIVER);
......
...@@ -3038,9 +3038,9 @@ typedef struct { ...@@ -3038,9 +3038,9 @@ typedef struct {
WCHAR DeviceString[128]; WCHAR DeviceString[128];
DWORD StateFlags; DWORD StateFlags;
} DISPLAY_DEVICEW,*PDISPLAY_DEVICEW,*LPDISPLAY_DEVICEW; } DISPLAY_DEVICEW,*PDISPLAY_DEVICEW,*LPDISPLAY_DEVICEW;
DECL_WINELIB_TYPE_AW(DISPLAY_DEVICE); DECL_WINELIB_TYPE_AW(DISPLAY_DEVICE)
DECL_WINELIB_TYPE_AW(PDISPLAY_DEVICE); DECL_WINELIB_TYPE_AW(PDISPLAY_DEVICE)
DECL_WINELIB_TYPE_AW(LPDISPLAY_DEVICE); DECL_WINELIB_TYPE_AW(LPDISPLAY_DEVICE)
/* DISPLAY_DEVICE.StateFlags (?)*/ /* DISPLAY_DEVICE.StateFlags (?)*/
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 #define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
......
...@@ -203,7 +203,7 @@ HGLOBAL16 WINAPI NE_DefResourceHandler( HGLOBAL16 hMemObj, HMODULE16 hModule, ...@@ -203,7 +203,7 @@ HGLOBAL16 WINAPI NE_DefResourceHandler( HGLOBAL16 hMemObj, HMODULE16 hModule,
{ {
/* NOTE: hRsrcMap points to start of built-in resource data */ /* NOTE: hRsrcMap points to start of built-in resource data */
memcpy( GlobalLock16( handle ), memcpy( GlobalLock16( handle ),
pModule->hRsrcMap + (pNameInfo->offset << sizeShift), (char *)pModule->hRsrcMap + (pNameInfo->offset << sizeShift),
pNameInfo->length << sizeShift ); pNameInfo->length << sizeShift );
} }
return handle; return handle;
......
...@@ -1290,7 +1290,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level ) ...@@ -1290,7 +1290,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level )
regf = base; regf = base;
/* hbin block */ /* hbin block */
hbin = base + 0x1000; hbin = (char *) base + 0x1000;
if (hbin->id != NT_REG_POOL_BLOCK_ID) if (hbin->id != NT_REG_POOL_BLOCK_ID)
{ {
ERR_(reg)( "%s hbin block invalid\n", fn); ERR_(reg)( "%s hbin block invalid\n", fn);
...@@ -1313,7 +1313,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level ) ...@@ -1313,7 +1313,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level )
goto error1; goto error1;
} }
ret = _nt_parse_nk (hkey, base+0x1000, nk, level); ret = _nt_parse_nk (hkey, (char *) base + 0x1000, nk, level);
} }
break; break;
default: default:
......
...@@ -541,7 +541,7 @@ INT WINAPI GetDIBits( ...@@ -541,7 +541,7 @@ INT WINAPI GetDIBits(
/*FIXME: Only RGB dibs supported for now */ /*FIXME: Only RGB dibs supported for now */
int srcwidth = bmp->dib->dsBm.bmWidth, srcwidthb = bmp->dib->dsBm.bmWidthBytes; int srcwidth = bmp->dib->dsBm.bmWidth, srcwidthb = bmp->dib->dsBm.bmWidthBytes;
int dstwidthb = DIB_GetDIBWidthBytes( info->bmiHeader.biWidth, info->bmiHeader.biBitCount ); int dstwidthb = DIB_GetDIBWidthBytes( info->bmiHeader.biWidth, info->bmiHeader.biBitCount );
LPBYTE dbits = bits, sbits = bmp->dib->dsBm.bmBits + (startscan * srcwidthb); LPBYTE dbits = bits, sbits = (LPBYTE) bmp->dib->dsBm.bmBits + (startscan * srcwidthb);
int x, y; int x, y;
if ((info->bmiHeader.biHeight < 0) ^ (bmp->dib->dsBmih.biHeight < 0)) if ((info->bmiHeader.biHeight < 0) ^ (bmp->dib->dsBmih.biHeight < 0))
......
...@@ -3407,7 +3407,7 @@ INT WINAPI GetNumberFormatA(LCID locale, DWORD dwflags, ...@@ -3407,7 +3407,7 @@ INT WINAPI GetNumberFormatA(LCID locale, DWORD dwflags,
} }
for (i=1;*sptr=='0' ;i++, sptr++) ; /* Ignore leading zeros from source*/ for (i=1;*sptr=='0' ;i++, sptr++) ; /* Ignore leading zeros from source*/
if (intsize==0 && (decsize==0 || thisleadingzero)) // Insert one leading zero into destination if required if (intsize==0 && (decsize==0 || thisleadingzero)) /* Insert one leading zero into destination if required */
*(dptr++)=digits_buf[0]; *(dptr++)=digits_buf[0];
for (i=1;i<=intsize;i++) { for (i=1;i<=intsize;i++) {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
*/ */
#include <math.h> #include <math.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "winclock.h" #include "winclock.h"
#include "windows.h" #include "windows.h"
......
...@@ -1171,7 +1171,7 @@ BOOL WINAPI WriteProcessMemory( HANDLE process, LPVOID addr, LPVOID buffer, DWOR ...@@ -1171,7 +1171,7 @@ BOOL WINAPI WriteProcessMemory( HANDLE process, LPVOID addr, LPVOID buffer, DWOR
req->addr = (char *)addr + pos; req->addr = (char *)addr + pos;
req->len = (max + sizeof(int) - 1) / sizeof(int); req->len = (max + sizeof(int) - 1) / sizeof(int);
req->first_mask = ~0; req->first_mask = ~0;
memcpy( req->data, buffer + pos, max ); memcpy( req->data, (char *) buffer + pos, max );
if (server_call( REQ_WRITE_PROCESS_MEMORY )) goto error; if (server_call( REQ_WRITE_PROCESS_MEMORY )) goto error;
pos += max; pos += max;
size -= max; size -= max;
......
...@@ -264,7 +264,7 @@ int convert_to_bin() ...@@ -264,7 +264,7 @@ int convert_to_bin()
{ {
printf("[%s:s]", outfile); printf("[%s:s]", outfile);
} }
end_of_resource: end_of_resource: ;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment