28 modified files
reactos/lib/advapi32/crypt
diff -u -r1.2 -r1.3
--- crypt.c 12 Dec 2004 15:16:26 -0000 1.2
+++ crypt.c 25 Dec 2004 11:18:49 -0000 1.3
@@ -325,7 +325,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto error;
}
- r = RegQueryValueExA(key, "Name", NULL, NULL, provname, &len);
+ r = RegQueryValueExA(key, "Name", NULL, NULL, (LPBYTE)provname, &len);
if (r != ERROR_SUCCESS)
{
DPRINT("error %ld reading 'Name' from registry\n", r );
@@ -381,7 +381,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto error;
}
- r = RegQueryValueExA(key, "Image Path", NULL, NULL, temp, &len);
+ r = RegQueryValueExA(key, "Image Path", NULL, NULL, (LPBYTE)temp, &len);
if (r != ERROR_SUCCESS)
{
DPRINT("error %ld reading 'Image Path' from registry\n", r );
@@ -1124,7 +1124,7 @@
*pdwProvType += (*(--ch) - '0') * 100;
CRYPT_Free(keyname);
- result = RegQueryValueExA(hSubkey, "TypeName", NULL, &dwType, pszTypeName, pcbTypeName);
+ result = RegQueryValueExA(hSubkey, "TypeName", NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName);
if (result)
CRYPT_ReturnLastError(result);
@@ -1281,7 +1281,7 @@
}
CRYPT_Free(keyname);
- result = RegQueryValueExA(hKey, "Name", NULL, NULL, pszProvName, pcbProvName);
+ result = RegQueryValueExA(hKey, "Name", NULL, NULL, (LPBYTE)pszProvName, pcbProvName);
if (result)
{
if (result != ERROR_MORE_DATA)
@@ -1760,7 +1760,7 @@
}
CRYPT_Free(keyname);
- if (RegSetValueExA(hTypeKey, "Name", 0, REG_SZ, pszProvName, strlen(pszProvName) + 1))
+ if (RegSetValueExA(hTypeKey, "Name", 0, REG_SZ, (LPBYTE)pszProvName, strlen(pszProvName) + 1))
{
RegCloseKey(hTypeKey);
RegCloseKey(hProvKey);
reactos/lib/advapi32/crypt
diff -u -r1.2 -r1.3
--- crypt_lmhash.c 12 Dec 2004 15:16:26 -0000 1.2
+++ crypt_lmhash.c 25 Dec 2004 11:18:49 -0000 1.3
@@ -27,18 +27,18 @@
static const unsigned char CRYPT_LMhash_Magic[8] =
{ 'K', 'G', 'S', '!', '@', '#', '$', '%' };
-static void CRYPT_LMhash(unsigned char *dst, const unsigned char *pwd, const int len)
+static void CRYPT_LMhash(LPSTR dst, LPCSTR pwd, const int len)
{
int i, max = 14;
- unsigned char tmp_pwd[14] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
+ CHAR tmp_pwd[14] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
max = len > max ? max : len;
for (i = 0; i < max; i++)
tmp_pwd[i] = pwd[i];
- CRYPT_DEShash(dst, tmp_pwd, CRYPT_LMhash_Magic);
- CRYPT_DEShash(&dst[8], &tmp_pwd[7], CRYPT_LMhash_Magic);
+ CRYPT_DEShash((PUCHAR)dst, (PUCHAR)tmp_pwd, CRYPT_LMhash_Magic);
+ CRYPT_DEShash((PUCHAR)&dst[8], (PUCHAR)&tmp_pwd[7], CRYPT_LMhash_Magic);
}
NTSTATUS WINAPI SystemFunction006(LPCSTR password, LPSTR hash)
reactos/lib/advapi32/crypt
diff -u -r1.2 -r1.3
--- crypt_sha.c 12 Dec 2004 15:16:26 -0000 1.2
+++ crypt_sha.c 25 Dec 2004 11:18:49 -0000 1.3
@@ -51,7 +51,7 @@
/* Hash a single 512-bit block. This is the core of the algorithm. */
static VOID
-SHA1Transform(ULONG State[5], CHAR Buffer[64])
+SHA1Transform(ULONG State[5], UCHAR Buffer[64])
{
ULONG a, b, c, d, e;
ULONG *Block;
@@ -162,7 +162,7 @@
A_SHAFinal(PSHA_CTX Context, PULONG Result)
{
INT Pad, Index;
- UCHAR Buffer[72];
+ CHAR Buffer[72];
ULONG *Count;
ULONG BufferContentSize, LengthHi, LengthLo;
reactos/lib/advapi32/reg
diff -u -r1.65 -r1.66
--- reg.c 18 Dec 2004 22:54:37 -0000 1.65
+++ reg.c 25 Dec 2004 11:18:50 -0000 1.66
@@ -1,4 +1,4 @@
-/* $Id: reg.c,v 1.65 2004/12/18 22:54:37 gvg Exp $
+/* $Id: reg.c,v 1.66 2004/12/25 11:18:50 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -2216,7 +2216,7 @@
val_list[i].ve_valuename,
NULL,
&val_list[i].ve_type,
- bufptr,
+ (LPBYTE)bufptr,
&val_list[i].ve_valuelen);
if (ErrorCode != ERROR_SUCCESS)
{
@@ -2280,7 +2280,7 @@
val_list[i].ve_valuename,
NULL,
&val_list[i].ve_type,
- bufptr,
+ (LPBYTE)bufptr,
&val_list[i].ve_valuelen);
if (ErrorCode != ERROR_SUCCESS)
{
@@ -2496,7 +2496,7 @@
if (ErrorCode == ERROR_SUCCESS && ValueData.Buffer != NULL)
{
RtlInitAnsiString(&AnsiString, NULL);
- AnsiString.Buffer = lpData;
+ AnsiString.Buffer = (LPSTR)lpData;
AnsiString.MaximumLength = *lpcbData;
ValueData.Length = Length;
ValueData.MaximumLength = ValueData.Length + sizeof(WCHAR);
reactos/lib/crtdll/mbstring
diff -u -r1.3 -r1.4
--- iskmoji.c 24 Nov 2002 18:42:14 -0000 1.3
+++ iskmoji.c 25 Dec 2004 11:18:50 -0000 1.4
@@ -2,5 +2,5 @@
int _ismbbkalpha(unsigned char c)
{
- return (0xA7 <= c <= 0xDF);
+ return (0xA7 <= c && c <= 0xDF);
}
reactos/lib/gdi32/objects
diff -u -r1.9 -r1.10
--- font.c 6 Sep 2004 21:15:46 -0000 1.9
+++ font.c 25 Dec 2004 11:18:50 -0000 1.10
@@ -1,4 +1,4 @@
-/* $Id: font.c,v 1.9 2004/09/06 21:15:46 weiden Exp $
+/* $Id: font.c,v 1.10 2004/12/25 11:18:50 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -16,7 +16,7 @@
#define INITIAL_FAMILY_COUNT 64
static BOOL FASTCALL
-MetricsCharConvert(WCHAR w, CHAR *b)
+MetricsCharConvert(WCHAR w, UCHAR *b)
{
UNICODE_STRING WString;
WCHAR WBuf[2];
@@ -243,11 +243,11 @@
{
RosRtlLogFontW2A(&EnumLogFontExA.elfLogFont, &Info[i].EnumLogFontEx.elfLogFont);
WideCharToMultiByte(CP_THREAD_ACP, 0, Info[i].EnumLogFontEx.elfFullName, -1,
- EnumLogFontExA.elfFullName, LF_FULLFACESIZE, NULL, NULL);
+ (LPSTR)EnumLogFontExA.elfFullName, LF_FULLFACESIZE, NULL, NULL);
WideCharToMultiByte(CP_THREAD_ACP, 0, Info[i].EnumLogFontEx.elfStyle, -1,
- EnumLogFontExA.elfStyle, LF_FACESIZE, NULL, NULL);
+ (LPSTR)EnumLogFontExA.elfStyle, LF_FACESIZE, NULL, NULL);
WideCharToMultiByte(CP_THREAD_ACP, 0, Info[i].EnumLogFontEx.elfScript, -1,
- EnumLogFontExA.elfScript, LF_FACESIZE, NULL, NULL);
+ (LPSTR)EnumLogFontExA.elfScript, LF_FACESIZE, NULL, NULL);
NewTextMetricExW2A(&NewTextMetricExA,
&Info[i].NewTextMetricEx);
Ret = ((FONTENUMPROCA) EnumProc)(
reactos/lib/kernel32/misc
diff -u -r1.3 -r1.4
--- lzexpand_main.c 3 Jul 2004 17:40:22 -0000 1.3
+++ lzexpand_main.c 25 Dec 2004 11:18:50 -0000 1.4
@@ -1,4 +1,4 @@
-/* $Id: lzexpand_main.c,v 1.3 2004/07/03 17:40:22 navaraf Exp $
+/* $Id: lzexpand_main.c,v 1.4 2004/12/25 11:18:50 navaraf Exp $
*
* LZ Decompression functions
*
@@ -460,7 +460,7 @@
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)
*/
reactos/lib/mesa32/src/main
diff -u -r1.2 -r1.3
--- texformat_tmp.h 25 Aug 2004 12:35:12 -0000 1.2
+++ texformat_tmp.h 25 Dec 2004 11:18:50 -0000 1.3
@@ -1,6 +1,7 @@
+/* $XFree86$ */
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.2
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
@@ -44,46 +45,34 @@
#if DIM == 1
#define CHAN_SRC( t, i, j, k, sz ) \
- ((void) (j), (void) (k), \
- ((GLchan *)(t)->Data + (i) * (sz)))
+ ((GLchan *)(t)->Data + (i) * (sz))
#define UBYTE_SRC( t, i, j, k, sz ) \
- ((void) (j), (void) (k), \
- ((GLubyte *)(t)->Data + (i) * (sz)))
+ ((GLubyte *)(t)->Data + (i) * (sz))
#define USHORT_SRC( t, i, j, k ) \
- ((void) (j), (void) (k), \
- ((GLushort *)(t)->Data + (i)))
+ ((GLushort *)(t)->Data + (i))
#define UINT_SRC( t, i, j, k ) \
- ((void) (j), (void) (k), \
- ((GLuint *)(t)->Data + (i)))
+ ((GLuint *)(t)->Data + (i))
#define FLOAT_SRC( t, i, j, k, sz ) \
- ((void) (j), (void) (k), \
- ((GLfloat *)(t)->Data + (i) * (sz)))
+ ((GLfloat *)(t)->Data + (i) * (sz))
#define HALF_SRC( t, i, j, k, sz ) \
- ((void) (j), (void) (k), \
- ((GLhalfARB *)(t)->Data + (i) * (sz)))
+ ((GLhalfARB *)(t)->Data + (i) * (sz))
#define FETCH(x) fetch_texel_1d_##x
#elif DIM == 2
#define CHAN_SRC( t, i, j, k, sz ) \
- ((void) (k), \
- ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
+ ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
#define UBYTE_SRC( t, i, j, k, sz ) \
- ((void) (k), \
- ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
+ ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
#define USHORT_SRC( t, i, j, k ) \
- ((void) (k), \
- ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i))))
+ ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i)))
#define UINT_SRC( t, i, j, k ) \
- ((void) (k), \
- ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i))))
+ ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i)))
#define FLOAT_SRC( t, i, j, k, sz ) \
- ((void) (k), \
- ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
+ ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
#define HALF_SRC( t, i, j, k, sz ) \
- ((void) (k), \
- ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
+ ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
#define FETCH(x) fetch_texel_2d_##x
@@ -1023,9 +1012,9 @@
GLint i, GLint j, GLint k, GLchan *texel )
{
const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 );
- const GLuint index = *src;
const struct gl_color_table *palette;
const GLchan *table;
+ GLuint index;
GET_CURRENT_CONTEXT(ctx);
if (ctx->Texture.SharedPalette) {
@@ -1039,6 +1028,9 @@
ASSERT(palette->Type != GL_FLOAT);
table = (const GLchan *) palette->Table;
+ /* Mask the index against size of palette to avoid going out of bounds */
+ index = (*src) & (palette->Size - 1);
+
switch (palette->Format) {
case GL_ALPHA:
texel[RCOMP] =
reactos/lib/msvcrt/ctype
diff -u -r1.6 -r1.7
--- tolower.c 11 Jul 2003 21:57:54 -0000 1.6
+++ tolower.c 25 Dec 2004 11:18:50 -0000 1.7
@@ -16,8 +16,7 @@
/*
* @implemented
*/
-int towlower(wint_t c)
-//wchar_t towlower(wchar_t c)
+wchar_t towlower(wchar_t c)
{
if (iswctype (c, _UPPER))
return (c - (L'A' - L'a'));
reactos/lib/msvcrt/ctype
diff -u -r1.7 -r1.8
--- toupper.c 11 Jul 2003 21:57:54 -0000 1.7
+++ toupper.c 25 Dec 2004 11:18:50 -0000 1.8
@@ -17,7 +17,7 @@
/*
* @implemented
*/
-int towupper(wint_t c)
+wchar_t towupper(wchar_t c)
{
if (iswctype (c, _LOWER))
return (c + (L'A' - L'a'));
reactos/lib/msvcrt/mbstring
diff -u -r1.4 -r1.5
--- iskmoji.c 29 Nov 2002 15:59:03 -0000 1.4
+++ iskmoji.c 25 Dec 2004 11:18:50 -0000 1.5
@@ -2,5 +2,5 @@
int _ismbbkalpha(unsigned char c)
{
- return (0xA7 <= c <= 0xDF);
+ return (0xA7 <= c && c <= 0xDF);
}
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbclen.c 11 Jul 2003 21:57:54 -0000 1.5
+++ mbclen.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -26,7 +26,7 @@
if ( s == NULL )
return 0;
- l = _mbclen(s);
+ l = _mbclen((const unsigned char *)s);
if ( l < count )
return -1;
return l;
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbscat.c 11 Jul 2003 21:57:54 -0000 1.5
+++ mbscat.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -5,5 +5,5 @@
*/
unsigned char * _mbscat(unsigned char *dst, const unsigned char *src)
{
- return strcat(dst,src);
+ return (unsigned char *)strcat((char*)dst,(const char*)src);
}
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbschr.c 11 Jul 2003 21:57:54 -0000 1.5
+++ mbschr.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -5,5 +5,5 @@
*/
unsigned char * _mbschr(const unsigned char *str, unsigned int c)
{
- return strchr(str,c);
+ return (unsigned char *)strchr((const char*)str, c);
}
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbscmp.c 11 Jul 2003 21:57:54 -0000 1.5
+++ mbscmp.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -6,5 +6,5 @@
*/
int _mbscmp(const unsigned char *str1, const unsigned char *str2)
{
- return strcmp(str1,str2);
+ return strcmp((const char*)str1, (char*)str2);
}
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbscpy.c 11 Jul 2003 21:57:54 -0000 1.5
+++ mbscpy.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -6,5 +6,5 @@
*/
unsigned char * _mbscpy(unsigned char *dst, const unsigned char *str)
{
- return strcpy(dst,str);
+ return (unsigned char*)strcpy((char*)dst,(const char*)str);
}
reactos/lib/msvcrt/mbstring
diff -u -r1.4 -r1.5
--- mbscspn.c 11 Jul 2003 21:57:54 -0000 1.4
+++ mbscspn.c 25 Dec 2004 11:18:50 -0000 1.5
@@ -7,7 +7,7 @@
*/
size_t _mbscspn(const unsigned char *s1, const unsigned char *s2)
{
- const char *p, *spanp;
+ const unsigned char *p, *spanp;
char c, sc;
for (p = s1;;)
reactos/lib/msvcrt/mbstring
diff -u -r1.6 -r1.7
--- mbsdup.c 11 Jul 2003 21:57:54 -0000 1.6
+++ mbsdup.c 25 Dec 2004 11:18:50 -0000 1.7
@@ -17,10 +17,10 @@
*/
unsigned char * _mbsdup(const unsigned char *_s)
{
- char *rv;
+ unsigned char *rv;
if (_s == 0)
return 0;
- rv = (char *)malloc(_mbslen(_s) + 1);
+ rv = (unsigned char *)malloc(_mbslen(_s) + 1);
if (rv == 0)
return 0;
_mbscpy(rv, _s);
reactos/lib/msvcrt/mbstring
diff -u -r1.7 -r1.8
--- mbsncat.c 11 Jul 2003 21:57:54 -0000 1.7
+++ mbsncat.c 25 Dec 2004 11:18:50 -0000 1.8
@@ -18,10 +18,10 @@
*/
unsigned char * _mbsncat(unsigned char *dst, const unsigned char *src, size_t n)
{
- char *d = (char *)dst;
- char *s = (char *)src;
+ unsigned char *d = dst;
+ const unsigned char *s = src;
if (n != 0) {
- d = dst + strlen(dst); // get the end of string
+ d = dst + _mbslen(dst); // get the end of string
d += _mbclen2(*d); // move 1 or 2 up
do {
@@ -43,10 +43,10 @@
*/
unsigned char * _mbsnbcat(unsigned char *dst, const unsigned char *src, size_t n)
{
- char *d;
- char *s = (char *)src;
+ unsigned char *d;
+ const unsigned char *s = src;
if (n != 0) {
- d = dst + strlen(dst); // get the end of string
+ d = dst + _mbslen(dst); // get the end of string
d += _mbclen2(*d); // move 1 or 2 up
do {
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbsspn.c 11 Jul 2003 21:58:09 -0000 1.5
+++ mbsspn.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -7,7 +7,7 @@
*/
size_t _mbsspn(const unsigned char *s1, const unsigned char *s2)
{
- const char *p = s1, *spanp;
+ const unsigned char *p = s1, *spanp;
char c, sc;
cont:
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbsspnp.c 11 Jul 2003 21:58:09 -0000 1.5
+++ mbsspnp.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -7,7 +7,7 @@
*/
unsigned char * _mbsspnp(const unsigned char *s1, const unsigned char *s2)
{
- const char *p = s1, *spanp;
+ const unsigned char *p = s1, *spanp;
char c, sc;
cont:
reactos/lib/msvcrt/mbstring
diff -u -r1.5 -r1.6
--- mbsstr.c 11 Jul 2003 21:58:09 -0000 1.5
+++ mbsstr.c 25 Dec 2004 11:18:50 -0000 1.6
@@ -11,7 +11,7 @@
if (src2 ==NULL || *src2 == 0)
return (unsigned char *)src1;
- len = _mbstrlen(src2);
+ len = _mbslen(src2);
while(*src1)
{
reactos/lib/msvcrt/mbstring
diff -u -r1.6 -r1.7
--- mbstok.c 11 Jul 2003 21:58:09 -0000 1.6
+++ mbstok.c 25 Dec 2004 11:18:50 -0000 1.7
@@ -5,10 +5,10 @@
*/
unsigned char * _mbstok(unsigned char *s, unsigned char *delim)
{
- const char *spanp;
+ const unsigned char *spanp;
int c, sc;
- char *tok;
- static char *last;
+ unsigned char *tok;
+ static unsigned char *last;
if (s == NULL && (s = last) == NULL)
reactos/lib/msvcrt/stdio
diff -u -r1.8 -r1.9
--- fputs.c 15 Aug 2004 18:16:38 -0000 1.8
+++ fputs.c 25 Dec 2004 11:18:50 -0000 1.9
@@ -1,4 +1,4 @@
-/* $Id: fputs.c,v 1.8 2004/08/15 18:16:38 chorns Exp $
+/* $Id: fputs.c,v 1.9 2004/12/25 11:18:50 navaraf Exp $
*
* ReactOS msvcrt library
*
@@ -76,7 +76,7 @@
if (unbuffered)
{
f->_flag &= ~_IONBF;
- f->_ptr = f->_base = (unsigned char*)localbuf;
+ f->_ptr = f->_base = (char*)localbuf;
f->_bufsiz = BUFSIZ;
}
reactos/lib/msvcrt/stdio
diff -u -r1.20 -r1.21
--- vfprintf.c 22 Aug 2004 20:32:32 -0000 1.20
+++ vfprintf.c 25 Dec 2004 11:18:50 -0000 1.21
@@ -723,7 +723,7 @@
long double _ldouble;
double _double;
const char *s;
- const short int* sw;
+ const wchar_t *sw;
int result, done = 0;
int flags; /* flags to number() */
reactos/lib/msvcrt/stdlib
diff -u -r1.5 -r1.6
--- swab.c 11 Jul 2003 21:58:09 -0000 1.5
+++ swab.c 25 Dec 2004 11:18:51 -0000 1.6
@@ -1,4 +1,3 @@
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
/*
@@ -6,16 +5,14 @@
*/
void _swab (const char* caFrom, char* caTo, size_t sizeToCopy)
{
- unsigned long temp;
+ if (sizeToCopy > 1)
+ {
+ sizeToCopy = sizeToCopy >> 1;
- sizeToCopy >>= 1; sizeToCopy++;
-#define STEP temp = *((const char *)caFrom)++,*((char *)caTo)++ = *((const char *)caFrom)++,*((char *)caTo)++ = temp
- /* round to multiple of 8 */
- while ((--sizeToCopy) & 07)
- STEP;
- sizeToCopy >>= 3;
- while (--sizeToCopy >= 0) {
- STEP; STEP; STEP; STEP;
- STEP; STEP; STEP; STEP;
+ while (sizeToCopy--) {
+ *caTo++ = caFrom[1];
+ *caTo++ = *caFrom++;
+ caFrom++;
+ }
}
}
reactos/lib/ntdll/ldr
diff -u -r1.103 -r1.104
--- utils.c 20 Dec 2004 02:31:48 -0000 1.103
+++ utils.c 25 Dec 2004 11:18:51 -0000 1.104
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.103 2004/12/20 02:31:48 navaraf Exp $
+/* $Id: utils.c,v 1.104 2004/12/25 11:18:51 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -974,7 +974,7 @@
DPRINT("BaseAddress: %p\n", Module->BaseAddress);
- return LdrGetExportByName(Module->BaseAddress, p+1, -1);
+ return LdrGetExportByName(Module->BaseAddress, (PUCHAR)(p+1), -1);
}
return NULL;
@@ -1110,7 +1110,7 @@
if (Hint < ExportDir->NumberOfNames)
{
ExName = RVA(BaseAddress, ExNames[Hint]);
- if (strcmp(ExName, SymbolName) == 0)
+ if (strcmp(ExName, (PCHAR)SymbolName) == 0)
{
Ordinal = ExOrdinals[Hint];
Function = RVA(BaseAddress, ExFunctions[Ordinal]);
@@ -1143,7 +1143,7 @@
mid = (minn + maxn) / 2;
ExName = RVA(BaseAddress, ExNames[mid]);
- res = strcmp(ExName, SymbolName);
+ res = strcmp(ExName, (PCHAR)SymbolName);
if (res == 0)
{
Ordinal = ExOrdinals[mid];
@@ -1184,7 +1184,7 @@
for (i = 0; i < ExportDir->NumberOfNames; i++)
{
ExName = RVA(BaseAddress, ExNames[i]);
- if (strcmp(ExName,SymbolName) == 0)
+ if (strcmp(ExName, (PCHAR)SymbolName) == 0)
{
Ordinal = ExOrdinals[i];
Function = RVA(BaseAddress, ExFunctions[Ordinal]);
@@ -1504,7 +1504,7 @@
static NTSTATUS
LdrpAdjustImportDirectory(PLDR_MODULE Module,
PLDR_MODULE ImportedModule,
- PUCHAR ImportedName)
+ PCHAR ImportedName)
{
PIMAGE_IMPORT_MODULE_DIRECTORY ImportModuleDirectory;
NTSTATUS Status;
@@ -1535,7 +1535,7 @@
while (ImportModuleDirectory->dwRVAModuleName)
{
Name = (PCHAR)Module->BaseAddress + ImportModuleDirectory->dwRVAModuleName;
- if (0 == _stricmp(Name, ImportedName))
+ if (0 == _stricmp(Name, (PCHAR)ImportedName))
{
/* Get the import address list. */
@@ -1727,7 +1727,7 @@
PIMAGE_BOUND_FORWARDER_REF BoundForwarderRef;
ULONG i;
PLDR_MODULE ForwarderModule;
- PUCHAR ForwarderName;
+ PCHAR ForwarderName;
BoundForwarderRef = (PIMAGE_BOUND_FORWARDER_REF)(BoundImportDescriptorCurrent + 1);
for (i = 0; i < BoundImportDescriptorCurrent->NumberOfModuleForwarderRefs; i++, BoundForwarderRef++)
@@ -2319,7 +2319,7 @@
if (Name && Name->Length)
{
/* by name */
- *ProcedureAddress = LdrGetExportByName(BaseAddress, Name->Buffer, 0xffff);
+ *ProcedureAddress = LdrGetExportByName(BaseAddress, (PUCHAR)Name->Buffer, 0xffff);
if (*ProcedureAddress != NULL)
{
return STATUS_SUCCESS;
reactos/lib/zlib
diff -u -r1.1 -r1.2
--- inftrees.c 24 Mar 2003 01:28:36 -0000 1.1
+++ inftrees.c 25 Dec 2004 11:18:51 -0000 1.2
@@ -127,6 +127,8 @@
int y; /* number of dummy codes added */
uInt z; /* number of entries in current table */
+ /* Make GCC 4.0 happy. */
+ r.base = 0;
/* Generate counts for each bit length */
p = c;
CVSspam 0.2.8