gcc 4.0 warning fixes.

This commit is contained in:
Mike McCormack 2005-08-17 10:28:35 +00:00 committed by Alexandre Julliard
parent 9b0b803b47
commit f58e9f9e4b
11 changed files with 18 additions and 19 deletions

View File

@ -1086,7 +1086,7 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start,
if (This->sInfo.dwSampleSize != 0) {
/* fixed samplesize -- we can read over frame/block boundaries */
ULONG block = start;
LONG block = start;
LONG offset = 0;
/* convert start sample to block,offset pair */

View File

@ -552,7 +552,7 @@ static HRESULT WINAPI IAVIEditStream_fnPaste(IAVIEditStream*iface,LONG*plStart,
IAVIEditStreamImpl *pEdit = NULL;
PAVISTREAM pStream;
DWORD startPos, endPos, streamNr, nStreams;
LONG n;
ULONG n;
TRACE("(%p,%p,%p,%p,%ld,%ld)\n",iface,plStart,plLength,
pSource,lStart,lLength);

View File

@ -59,7 +59,7 @@ typedef struct
HANDLE16 next;
WORD refCount;
BYTE length;
BYTE str[1];
CHAR str[1];
} ATOMENTRY;
typedef struct

View File

@ -84,9 +84,9 @@ static LPWSTR load_messageW( HMODULE module, UINT id, WORD lang )
}
else
{
int len = MultiByteToWideChar( CP_ACP, 0, mre->Text, -1, NULL, 0 );
int len = MultiByteToWideChar( CP_ACP, 0, (const char *)mre->Text, -1, NULL, 0 );
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL;
MultiByteToWideChar( CP_ACP, 0, mre->Text, -1, buffer, len );
MultiByteToWideChar( CP_ACP, 0, (const char*)mre->Text, -1, buffer, len );
}
TRACE("returning %s\n", wine_dbgstr_w(buffer));
return buffer;
@ -114,7 +114,7 @@ static LPSTR load_messageA( HMODULE module, UINT id, WORD lang )
}
else
{
int len = strlen(mre->Text) + 1;
int len = strlen((const char*)mre->Text) + 1;
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len ))) return NULL;
memcpy( buffer, mre->Text, len );
}

View File

@ -455,7 +455,7 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest )
FILETIME filetime;
struct lzstate *lzs;
#define BUFLEN 1000
BYTE buf[BUFLEN];
CHAR buf[BUFLEN];
/* we need that weird typedef, for i can't seem to get function pointer
* casts right. (Or they probably just do not like WINAPI in general)
*/

View File

@ -201,11 +201,10 @@ static inline BOOL apply_relocations( NE_MODULE *pModule, const struct relocatio
case NE_RELTYPE_NAME:
module = pModuleTable[rep->target1-1];
func_name = (char *)pModule + pModule->ne_imptab + rep->target2;
func_name = (BYTE *)pModule + pModule->ne_imptab + rep->target2;
memcpy( buffer, func_name+1, *func_name );
buffer[*func_name] = '\0';
func_name = buffer;
ordinal = NE_GetOrdinal( module, func_name );
ordinal = NE_GetOrdinal( module, buffer );
address = NE_GetEntryPoint( module, ordinal );
if (ERR_ON(fixup) && !address)
@ -213,7 +212,7 @@ static inline BOOL apply_relocations( NE_MODULE *pModule, const struct relocatio
NE_MODULE *pTarget = NE_GetPtr( module );
ERR("No implementation for %.*s.%s, setting to 0xdeadbeef\n",
*((BYTE *)pTarget + pTarget->ne_restab),
(char *)pTarget + pTarget->ne_restab + 1, func_name );
(char *)pTarget + pTarget->ne_restab + 1, buffer );
}
if (!address) address = (FARPROC16) 0xdeadbeef;
if (TRACE_ON(fixup))
@ -222,7 +221,7 @@ static inline BOOL apply_relocations( NE_MODULE *pModule, const struct relocatio
TRACE("%d: %.*s.%s=%04x:%04x %s\n", i + 1,
*((BYTE *)pTarget + pTarget->ne_restab),
(char *)pTarget + pTarget->ne_restab + 1,
func_name, HIWORD(address), LOWORD(address),
buffer, HIWORD(address), LOWORD(address),
NE_GetRelocAddrName( rep->address_type, additive ) );
}
break;

View File

@ -236,11 +236,11 @@ static const CALLFROM16 *get_entry_point( STACK16FRAME *frame, LPSTR module, LPS
ET_BUNDLE *bundle;
ET_ENTRY *entry;
*pOrd = 0;
if (!(pModule = NE_GetPtr( FarGetOwner16( GlobalHandle16( frame->module_cs ) ))))
return NULL;
max_offset = 0;
*pOrd = 0;
bundle = (ET_BUNDLE *)((BYTE *)pModule + pModule->ne_enttab);
do
{

View File

@ -261,7 +261,7 @@ static NE_TYPEINFO *NE_FindTypeSection( LPBYTE pResTab, NE_TYPEINFO *pTypeInfo,
if (!(pTypeInfo->type_id & 0x8000))
{
BYTE *p = pResTab + pTypeInfo->type_id;
if ((*p == len) && !strncasecmp( p+1, str, len ))
if ((*p == len) && !strncasecmp( (char*)p+1, str, len ))
{
TRACE(" Found type '%s'\n", str );
return pTypeInfo;
@ -308,7 +308,7 @@ static NE_NAMEINFO *NE_FindResourceFromType( LPBYTE pResTab, NE_TYPEINFO *pTypeI
{
if (pNameInfo->id & 0x8000) continue;
p = pResTab + pNameInfo->id;
if ((*p == len) && !strncasecmp( p+1, str, len ))
if ((*p == len) && !strncasecmp( (char*)p+1, str, len ))
return pNameInfo;
}
}

View File

@ -203,7 +203,7 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
/* Now search the non-resident names table */
if (!*cpnt && pModule->nrname_handle) {
cpnt = (char *)GlobalLock16( pModule->nrname_handle );
cpnt = (unsigned char *)GlobalLock16( pModule->nrname_handle );
while (*cpnt) {
cpnt += *cpnt + 1 + sizeof(WORD);
if (*(WORD*)(cpnt+*cpnt+1) == ordinal) {

View File

@ -831,7 +831,7 @@ HANDLE WINAPI OpenSemaphoreW( DWORD access, BOOL inherit, LPCWSTR name )
*/
BOOL WINAPI ReleaseSemaphore( HANDLE handle, LONG count, LONG *previous )
{
NTSTATUS status = NtReleaseSemaphore( handle, count, previous );
NTSTATUS status = NtReleaseSemaphore( handle, count, (PULONG)previous );
if (status) SetLastError( RtlNtStatusToDosError(status) );
return !status;
}

View File

@ -374,7 +374,7 @@ static void VOLUME_GetSuperblockLabel( enum fs_type type, const BYTE *superblock
}
}
if (label_len) RtlMultiByteToUnicodeN( label, (len-1) * sizeof(WCHAR),
&label_len, label_ptr, label_len );
&label_len, (char*)label_ptr, label_len );
label_len /= sizeof(WCHAR);
label[label_len] = 0;
while (label_len && label[label_len-1] == ' ') label[--label_len] = 0;
@ -386,7 +386,7 @@ static void VOLUME_GetSuperblockLabel( enum fs_type type, const BYTE *superblock
*/
static BOOL VOLUME_SetSuperblockLabel( enum fs_type type, HANDLE handle, const WCHAR *label )
{
BYTE label_data[11];
CHAR label_data[11];
DWORD offset, len;
switch(type)