char -> const char fixes.

This commit is contained in:
Rémi Assailly 2005-01-28 14:02:52 +00:00 committed by Alexandre Julliard
parent 09c68d9dd5
commit 193d527736
5 changed files with 10 additions and 14 deletions

View file

@ -63,7 +63,7 @@ BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR);
* FALSE if sibling could not be loaded or instantiated twice, TRUE * FALSE if sibling could not be loaded or instantiated twice, TRUE
* otherwise. * otherwise.
*/ */
static char * GPA_string = "Failed to get entry point %s for hinst = 0x%08x\n"; static const char * GPA_string = "Failed to get entry point %s for hinst = 0x%08x\n";
#define GPA(dest, hinst, name) \ #define GPA(dest, hinst, name) \
if(!(dest = (void*)GetProcAddress(hinst,name)))\ if(!(dest = (void*)GetProcAddress(hinst,name)))\
{ \ { \

View file

@ -409,7 +409,7 @@ static TEST test[] =
pdcb->wReserved1 & 0xffff ); pdcb->wReserved1 & 0xffff );
} */ } */
static void check_result(char *function, TEST *ptest, int initial_value, BOOL result) static void check_result(const char *function, TEST *ptest, int initial_value, BOOL result)
{ {
DWORD LastError = GetLastError(); DWORD LastError = GetLastError();
DWORD CorrectError = (ptest->result ? 0xdeadbeef : ERROR_INVALID_PARAMETER); DWORD CorrectError = (ptest->result ? 0xdeadbeef : ERROR_INVALID_PARAMETER);
@ -421,7 +421,7 @@ static void check_result(char *function, TEST *ptest, int initial_value, BOOL re
#define check_dcb_member(a,b) ok(pdcb1->a == pdcb2->a, "%s(\"%s\"), 0x%02x: "#a" is "b", should be "b"\n", function, ptest->string, initial_value, pdcb1->a, pdcb2->a) #define check_dcb_member(a,b) ok(pdcb1->a == pdcb2->a, "%s(\"%s\"), 0x%02x: "#a" is "b", should be "b"\n", function, ptest->string, initial_value, pdcb1->a, pdcb2->a)
#define check_dcb_member2(a,c,b) if(pdcb2->a == c) { check_dcb_member(a,b); } else { ok(pdcb1->a == pdcb2->a || pdcb1->a == c, "%s(\"%s\"), 0x%02x: "#a" is "b", should be "b" or "b"\n", function, ptest->string, initial_value, pdcb1->a, pdcb2->a, c); } #define check_dcb_member2(a,c,b) if(pdcb2->a == c) { check_dcb_member(a,b); } else { ok(pdcb1->a == pdcb2->a || pdcb1->a == c, "%s(\"%s\"), 0x%02x: "#a" is "b", should be "b" or "b"\n", function, ptest->string, initial_value, pdcb1->a, pdcb2->a, c); }
static void check_dcb(char *function, TEST *ptest, int initial_value, DCB *pdcb1, DCB *pdcb2) static void check_dcb(const char *function, TEST *ptest, int initial_value, DCB *pdcb1, DCB *pdcb2)
{ {
/* DCBlength is a special case since Win 9x sets it but NT does not. /* DCBlength is a special case since Win 9x sets it but NT does not.
We will accept either as correct. */ We will accept either as correct. */
@ -493,7 +493,7 @@ static void check_dcb(char *function, TEST *ptest, int initial_value, DCB *pdcb1
#define check_timeouts_member(a) ok(ptimeouts1->a == ptimeouts2->a, "%s(\"%s\"), 0x%02x: "#a" is %lu, should be %lu\n", function, ptest->string, initial_value, ptimeouts1->a, ptimeouts2->a); #define check_timeouts_member(a) ok(ptimeouts1->a == ptimeouts2->a, "%s(\"%s\"), 0x%02x: "#a" is %lu, should be %lu\n", function, ptest->string, initial_value, ptimeouts1->a, ptimeouts2->a);
static void check_timeouts(char *function, TEST *ptest, int initial_value, COMMTIMEOUTS *ptimeouts1, COMMTIMEOUTS *ptimeouts2) static void check_timeouts(const char *function, TEST *ptest, int initial_value, COMMTIMEOUTS *ptimeouts1, COMMTIMEOUTS *ptimeouts2)
{ {
check_timeouts_member(ReadIntervalTimeout); check_timeouts_member(ReadIntervalTimeout);
check_timeouts_member(ReadTotalTimeoutMultiplier); check_timeouts_member(ReadTotalTimeoutMultiplier);

View file

@ -137,8 +137,8 @@ static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize)
{ {
COORD c; COORD c;
DWORD len, mode; DWORD len, mode;
char* mytest; const char* mytest = "123";
int mylen; const int mylen = strlen(mytest);
int ret; int ret;
int p; int p;
@ -149,10 +149,6 @@ static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize)
c.X = sbSize.X - 3; c.Y = 0; c.X = sbSize.X - 3; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n"); ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n");
mytest = "123";
mylen = strlen(mytest);
ret = WriteConsole(hCon, mytest, mylen, &len, NULL); ret = WriteConsole(hCon, mytest, mylen, &len, NULL);
ok(ret != 0 && len == mylen, "Couldn't write, ret = %d, len = %ld\n", ret, len); ok(ret != 0 && len == mylen, "Couldn't write, ret = %d, len = %ld\n", ret, len);
c.Y = 0; c.Y = 0;

View file

@ -47,11 +47,11 @@
#include <winerror.h> #include <winerror.h>
#include <lzexpand.h> #include <lzexpand.h>
static char* filename_ = "testfile.xx_"; static char filename_[] = "testfile.xx_";
#if 0 #if 0
static char* filename = "testfile.xxx"; static char filename[] = "testfile.xxx";
#endif #endif
static char* filename2 = "testfile.yyy"; static char filename2[] = "testfile.yyy";
/* This is the hex string representation of the file created by compressing /* This is the hex string representation of the file created by compressing
a simple text file with the contents "This is a test file." a simple text file with the contents "This is a test file."

View file

@ -725,7 +725,7 @@ static void map_so_lib( const char *name, struct wld_link_map *l)
/* /*
* Find a symbol in the symbol table of the executable loaded * Find a symbol in the symbol table of the executable loaded
*/ */
static void *find_symbol( const ElfW(Phdr) *phdr, int num, char *var ) static void *find_symbol( const ElfW(Phdr) *phdr, int num, const char *var )
{ {
const ElfW(Dyn) *dyn = NULL; const ElfW(Dyn) *dyn = NULL;
const ElfW(Phdr) *ph; const ElfW(Phdr) *ph;