From c0441b0e5f48b9eef615ff4feb72a6000bf6283e Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 25 Jan 2005 05:11:17 +0000 Subject: [PATCH] Fix compiler errors. Patch by Herve Poussineau. Fixes bug 478 svn path=/trunk/; revision=13267 --- rosapps/cmdutils/touch/touch.c | 4 +- rosapps/cmdutils/touch/various.h | 2 +- rosapps/dflat32/editbox.c | 12 ++--- rosapps/dflat32/slidebox.c | 2 +- rosapps/games/winemine/main.c | 2 +- rosapps/mc/pc/chmod.c | 8 +-- rosapps/mc/pc/util_nt.c | 2 +- rosapps/mc/slang/slvideo.c | 8 +-- rosapps/mc/src/file.c | 4 +- rosapps/mc/src/panel.h | 2 +- rosapps/mc/src/screen.c | 16 ++---- rosapps/net/niclist/niclist.c | 4 +- rosapps/sysutils/format.c | 4 +- rosapps/sysutils/kill/kill.c | 6 +-- rosapps/sysutils/pedump.c | 84 ++++++++++++++++---------------- rosapps/sysutils/tcat/cat.c | 2 +- rosapps/sysutils/tlist/tlist.c | 6 +-- rosapps/sysutils/win32err.c | 6 +-- rosapps/winfile/dialogs.c | 4 +- rosapps/winfile/treeview.h | 5 -- 20 files changed, 87 insertions(+), 96 deletions(-) diff --git a/rosapps/cmdutils/touch/touch.c b/rosapps/cmdutils/touch/touch.c index 42640f55704..43f9f3ea1de 100644 --- a/rosapps/cmdutils/touch/touch.c +++ b/rosapps/cmdutils/touch/touch.c @@ -78,7 +78,7 @@ void stime_arg2 __P((char *, int, time_t *)); void stime_file __P((char *, time_t *)); void usage __P((void)); -void +int main(int argc, char *argv[]) { struct stat sb; @@ -194,7 +194,7 @@ main(int argc, char *argv[]) if (rw(*argv, &sb, fflag)) rval = 1; DbgPrint("[%s]", "[23]"); } - exit(rval); DbgPrint("[%s]", "[23]"); + return rval; DbgPrint("[%s]", "[23]"); } #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; diff --git a/rosapps/cmdutils/touch/various.h b/rosapps/cmdutils/touch/various.h index 22c6deee69d..ea9ed645483 100644 --- a/rosapps/cmdutils/touch/various.h +++ b/rosapps/cmdutils/touch/various.h @@ -23,7 +23,7 @@ typedef double f8byte_t; typedef long uid_t; // SunOS 5.5 #define __P(x) x -#define __STDC__ 1 +//#define __STDC__ 1 /* utmp.h */ #define UT_LINESIZE 8 diff --git a/rosapps/dflat32/editbox.c b/rosapps/dflat32/editbox.c index 1e2ed1958ae..348639f01ab 100644 --- a/rosapps/dflat32/editbox.c +++ b/rosapps/dflat32/editbox.c @@ -515,7 +515,7 @@ static void KeyTyped(DFWINDOW wnd, int c) currchar = DfCurrChar; } /* ---- test typing at end of text ---- */ - if (currchar == wnd->text+wnd->MaxTextLength) { + if (currchar == (char*)(wnd->text+wnd->MaxTextLength)) { /* ---- typing at the end of maximum buffer ---- */ DfBeep(); return; @@ -571,14 +571,14 @@ static void KeyTyped(DFWINDOW wnd, int c) /* ---------- test end of window --------- */ if (DfWndCol == DfClientWidth(wnd)-1) { if (!DfIsMultiLine(wnd)) { - if (!(currchar == wnd->text+wnd->MaxTextLength-2)) + if (!(currchar == (char*)(wnd->text+wnd->MaxTextLength-2))) DfSendMessage(wnd, DFM_HORIZSCROLL, TRUE, 0); } else { char *cp = currchar; - while (*cp != ' ' && cp != DfTextLine(wnd, wnd->CurrLine)) + while (*cp != ' ' && cp != (char*)DfTextLine(wnd, wnd->CurrLine)) --cp; - if (cp == DfTextLine(wnd, wnd->CurrLine) || + if (cp == (char*)DfTextLine(wnd, wnd->CurrLine) || !wnd->WordWrapMode) DfSendMessage(wnd, DFM_HORIZSCROLL, TRUE, 0); else { @@ -807,7 +807,7 @@ static void ParagraphCmd(DFWINDOW wnd) if (*bel == '\n') --bel; /* --- change all newlines in block to spaces --- */ - while (DfCurrChar < bel) { + while ((char*)DfCurrChar < bel) { if (*DfCurrChar == '\n') { *DfCurrChar = ' '; wnd->CurrLine++; @@ -818,7 +818,7 @@ static void ParagraphCmd(DFWINDOW wnd) } /* ---- insert newlines at new margin boundaries ---- */ bb = bbl; - while (bbl < bel) { + while ((char*)bbl < (char*)bel) { bbl++; if ((int)(bbl - bb) == DfClientWidth(wnd)-1) { while (*bbl != ' ' && bbl > bb) diff --git a/rosapps/dflat32/slidebox.c b/rosapps/dflat32/slidebox.c index 2a1c89268d3..e727ac3eac3 100644 --- a/rosapps/dflat32/slidebox.c +++ b/rosapps/dflat32/slidebox.c @@ -42,7 +42,7 @@ SliderTextProc (DFWINDOW wnd,DFMESSAGE msg,DF_PARAM p1,DF_PARAM p2) case DFM_PAINT: Percent = (int)p2; InsertPercent(DfGetText(wnd) ? - DfGetText(wnd) : SliderBoxDB.ctl[1].itext); + (char*)DfGetText(wnd) : SliderBoxDB.ctl[1].itext); GenericProc(wnd, DFM_PAINT, 0, 0); if (Percent >= 100) DfSendMessage(DfGetParent(wnd),DFM_COMMAND,DF_ID_CANCEL,0); diff --git a/rosapps/games/winemine/main.c b/rosapps/games/winemine/main.c index 6d0233f0dac..bc610e627fc 100644 --- a/rosapps/games/winemine/main.c +++ b/rosapps/games/winemine/main.c @@ -57,7 +57,7 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd wc.cbWndExtra = 0; wc.hInstance = hInst; wc.hIcon = LoadIcon( hInst, appname ); - wc.hCursor = LoadCursor( NULL_HANDLE, IDI_APPLICATION ); + wc.hCursor = LoadCursor( NULL_HANDLE, (LPCTSTR)IDI_APPLICATION ); wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH ); wc.lpszMenuName = "MENU_WINEMINE"; wc.lpszClassName = appname; diff --git a/rosapps/mc/pc/chmod.c b/rosapps/mc/pc/chmod.c index f8f5502066a..cfaa777f1ee 100644 --- a/rosapps/mc/pc/chmod.c +++ b/rosapps/mc/pc/chmod.c @@ -377,7 +377,7 @@ static void do_chmod (mode_t sf) static void apply_mask (mode_t sf) { char *fname; - mode_t sf_stat; + int sf_stat; need_update = end_chmod = 1; do_chmod (sf); @@ -387,7 +387,7 @@ static void apply_mask (mode_t sf) if ((sf_stat = pc_stat_file (fname)) < 0) break; - c_stat = sf_stat; + c_stat = (mode_t) sf_stat; do_chmod (c_stat); } while (cpanel->marked); } @@ -397,7 +397,7 @@ void chmod_cmd (void) char buffer [10]; char *fname; int i; - mode_t sf_stat; + int sf_stat; do { /* do while any files remaining */ init_chmod (); @@ -409,7 +409,7 @@ void chmod_cmd (void) if ((sf_stat = pc_stat_file (fname)) < 0) /* get status of file */ break; - c_stat = sf_stat; + c_stat = (mode_t) sf_stat; mode_change = 0; /* clear changes flag */ /* set check buttons */ diff --git a/rosapps/mc/pc/util_nt.c b/rosapps/mc/pc/util_nt.c index a8497c7abaf..cc97b44f278 100644 --- a/rosapps/mc/pc/util_nt.c +++ b/rosapps/mc/pc/util_nt.c @@ -629,7 +629,7 @@ int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...) } va_end (ap); // Spawn process - pid = spawnvp(P_NOWAIT,command, args);// argv[1], (const char* const*)&argv[1]); + pid = spawnvp(P_NOWAIT,command, (const char* const*)args);// argv[1], (const char* const*)&argv[1]); if(!pid) exit (1); // Duplicate copy of original stdin back into stdin diff --git a/rosapps/mc/slang/slvideo.c b/rosapps/mc/slang/slvideo.c index d92c2807f53..911f39eca8b 100644 --- a/rosapps/mc/slang/slvideo.c +++ b/rosapps/mc/slang/slvideo.c @@ -248,7 +248,7 @@ static void restore_screen (void) void SLtt_write_string (char *str) { #ifdef WIN32 - int bytes; + unsigned long bytes; (void) WriteConsole(hStdout, str, strlen(str), &bytes, NULL); #else @@ -1017,7 +1017,7 @@ static void write_attributes (unsigned short *src, int count) register unsigned char *p = Line_Buffer; register unsigned short pair; #ifdef WIN32 - register unsigned char * org_src = src; + register unsigned char * org_src = (unsigned char*)src; COORD coord; long bytes; #endif @@ -1062,7 +1062,7 @@ static void write_attributes (unsigned short *src, int count) /* write color attributes */ p = Line_Buffer; n = count; - src = org_src; /* restart the src pointer */ + src = (unsigned short*)org_src; /* restart the src pointer */ /* write into attributes only */ while (n-- > 0) @@ -1073,7 +1073,7 @@ static void write_attributes (unsigned short *src, int count) *(p++) = 0; /* what's this for? */ } - WriteConsoleOutputAttribute(hStdout, Line_Buffer, count, coord, &bytes); + WriteConsoleOutputAttribute(hStdout, (WORD*)Line_Buffer, count, coord, &bytes); # else /* __os2__ */ /* ScreenUpdateLine (void *virtual_screen_line, int row); */ p = Line_Buffer; diff --git a/rosapps/mc/src/file.c b/rosapps/mc/src/file.c index 49044f6fbea..df8405f7a61 100644 --- a/rosapps/mc/src/file.c +++ b/rosapps/mc/src/file.c @@ -122,7 +122,7 @@ static int do_reget; -/* rcsid [] = "$Id: file.c,v 1.2 2003/06/27 21:10:35 gvg Exp $" */ +/* rcsid [] = "$Id$" */ int verbose = 1; /* Recursive operation on subdirectories */ @@ -211,7 +211,7 @@ static char *dest_mask = NULL; /* To symlinks the difference between `follow Links' checked and not checked is the stat call used (mc_stat resp. mc_lstat) */ -int (*xstat)(char *, struct stat *) = mc_lstat; +int (*xstat)(const char *, struct stat *) = mc_lstat; static int op_follow_links = 0; diff --git a/rosapps/mc/src/panel.h b/rosapps/mc/src/panel.h index 122a0ec84aa..643379c8cf2 100644 --- a/rosapps/mc/src/panel.h +++ b/rosapps/mc/src/panel.h @@ -248,7 +248,7 @@ void do_file_mark (WPanel *panel, int index, int val); int file_compute_color (int attr, file_entry *fe); int file_entry_color (file_entry *fe); void do_file_mark_range (WPanel *panel, int r1, int r2); -int do_enter (WPanel *panel); +void do_enter (WPanel *panel); /* NOTE: Have to be ifdefed for HAVE_X */ void x_panel_select_item (WPanel *panel, int index, int val); diff --git a/rosapps/mc/src/screen.c b/rosapps/mc/src/screen.c index 178fdb43646..0fbb407a3a4 100644 --- a/rosapps/mc/src/screen.c +++ b/rosapps/mc/src/screen.c @@ -59,7 +59,7 @@ #include "x.h" -/* "$Id: screen.c,v 1.1 2001/12/30 09:55:21 sedwards Exp $" */ +/* "$Id$" */ #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) /* If true, show the mini-info on the panel */ @@ -2020,13 +2020,13 @@ start_search (WPanel *panel) } } -int +void do_enter (WPanel *panel) { if (S_ISDIR (selection (panel)->buf.st_mode) || link_isdir (selection (panel))){ do_cd (selection (panel)->fname, cd_exact); - return 1; + return; } else { if (is_exe (selection (panel)->buf.st_mode) && if_link_is_exe (selection (panel))) { @@ -2053,15 +2053,9 @@ do_enter (WPanel *panel) free (tmp2); } #endif /* USE_VFS */ - return 1; + return; } else { - char *p; - - p = regex_command (selection (panel)->fname, "Open", NULL, 0); - if (p && (strcmp (p, "Success") == 0)) - return 1; - else - return 0; + regex_command (selection (panel)->fname, "Open", NULL, 0); } } } diff --git a/rosapps/net/niclist/niclist.c b/rosapps/net/niclist/niclist.c index dc7704cd539..4c7cdb8ea21 100644 --- a/rosapps/net/niclist/niclist.c +++ b/rosapps/net/niclist/niclist.c @@ -1,4 +1,4 @@ -/* $Id: niclist.c,v 1.3 2004/01/12 22:45:53 sedwards Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS packet driver interface list utility @@ -53,7 +53,7 @@ int main(int argc, char **argv) HINSTANCE hPacket = LoadLibrary("PACKET.DLL"); if (hPacket) { PacketGetAdapterNames = (BOOLEAN (*)(PTSTR, PULONG))GetProcAddress(hPacket, "PacketGetAdapterNames"); - PacketGetVersion = (BOOLEAN (*)(PTSTR, PULONG))GetProcAddress(hPacket, "PacketGetVersion"); + PacketGetVersion = (PCHAR (*)(VOID))GetProcAddress(hPacket, "PacketGetVersion"); } else { printf("Could not load WinPCap driver! for more information goto:\n"); printf ("http://netgroup-serv.polito.it/winpcap\n"); diff --git a/rosapps/sysutils/format.c b/rosapps/sysutils/format.c index 1dc0addf8cc..a8324fdecfe 100644 --- a/rosapps/sysutils/format.c +++ b/rosapps/sysutils/format.c @@ -1,6 +1,6 @@ //====================================================================== // -// $Id: format.c,v 1.3 2003/01/14 18:51:12 guido Exp $ +// $Id$ // // Formatx // @@ -334,7 +334,7 @@ wmain( int argc, WCHAR *argv[] ) { int badArg; - DWORD media; + DWORD media = 0; DWORD driveType; WCHAR fileSystem [1024]; diff --git a/rosapps/sysutils/kill/kill.c b/rosapps/sysutils/kill/kill.c index f1b0314bbb6..98639b2b6f7 100644 --- a/rosapps/sysutils/kill/kill.c +++ b/rosapps/sysutils/kill/kill.c @@ -40,7 +40,7 @@ ExecuteKill(char * lpPid) DWORD dwProcessId; dwProcessId = (DWORD) atol(lpPid); - fprintf( stderr, "Killing PID %d...\n",dwProcessId); + fprintf( stderr, "Killing PID %ld...\n",dwProcessId); hProcess = OpenProcess( PROCESS_TERMINATE, FALSE, @@ -48,7 +48,7 @@ ExecuteKill(char * lpPid) ); if (NULL == hProcess) { - fprintf( stderr, "Could not open the process with PID = %d\n", dwProcessId); + fprintf( stderr, "Could not open the process with PID = %ld\n", dwProcessId); return 0; } if (FALSE == TerminateProcess( @@ -56,7 +56,7 @@ ExecuteKill(char * lpPid) 0 ) ) { - fprintf( stderr, "Could not terminate the process with PID = %d\n", dwProcessId); + fprintf( stderr, "Could not terminate the process with PID = %ld\n", dwProcessId); return 0; } CloseHandle(hProcess); diff --git a/rosapps/sysutils/pedump.c b/rosapps/sysutils/pedump.c index 81a8869cece..8a538192223 100644 --- a/rosapps/sysutils/pedump.c +++ b/rosapps/sysutils/pedump.c @@ -1,4 +1,4 @@ -// $Id: pedump.c,v 1.1 2001/01/13 18:19:23 ea Exp $ +// $Id$ // // This program was written by Sang Cho, assistant professor at // the department of @@ -48,6 +48,7 @@ #include #include #include +#include #ifndef bcopy #define bcopy(s,d,z) memcpy((d),(s),(z)) @@ -1060,7 +1061,7 @@ GetActualAddress ( int nSections = NumOfSections (lpFile); int i = 0; - if (dwRVA == NULL) + if (dwRVA == 0) return NULL; if (dwRVA & 0x80000000) { @@ -1954,7 +1955,7 @@ TranslateFunctionName ( { - int i, j, n; + int i, /*j,*/ n; char c, cc; static char buff[512]; // result of translation @@ -2375,7 +2376,7 @@ GetExportFunctionNames ( char buff[256]; // enough for any string ?? - char *psz; //=============================== + char *psz = NULL; //=============================== DWORD *pdwAddress; DWORD *pdw1; @@ -2737,8 +2738,8 @@ MenuScan ( int *len, WORD ** pMenu) { - int num = 0; - int ndetails; + //int num = 0; + //int ndetails; WORD *pwd; WORD flag, flag1; WORD id, ispopup; @@ -2805,12 +2806,12 @@ MenuFill ( char **psz, WORD ** pMenu) { - int num = 0; - int ndetails; - char *ptr, *pTemp; + //int num = 0; + //int ndetails; + char *ptr/*, *pTemp*/; WORD *pwd; WORD flag, flag1; - WORD id, ispopup; + WORD id/*, ispopup*/; ptr = *psz; pwd = *pMenu; @@ -2927,19 +2928,20 @@ GetContentsOfMenu ( //PIMAGE_SECTION_HEADER psh = (PIMAGE_SECTION_HEADER) //ImageDirectorySection (lpFile, IMAGE_DIRECTORY_ENTRY_RESOURCE); PIMAGE_MENU_HEADER pMenuHeader; - PIMAGE_POPUP_MENU_ITEM pPopup; - PIMAGE_NORMAL_MENU_ITEM pNormal; + //PIMAGE_POPUP_MENU_ITEM pPopup; + WORD* pPopup; + //PIMAGE_NORMAL_MENU_ITEM pNormal; char buff[32]; - int nCnt = 0, i, j; - int num = 0; + int /*nCnt = 0,*/ i, j; + //int num = 0; int size; int sLength, nMenus; WORD flag; WORD *pwd; - DWORD prdeName; + //DWORD prdeName; //DWORD dwBase; obsolete - char *pMem, *pTemp; - BOOL isStrange = FALSE; + char *pMem/*, *pTemp*/; + //BOOL isStrange = FALSE; /* get root directory of resource tree */ @@ -3020,7 +3022,7 @@ GetContentsOfMenu ( // normal case else { - pPopup = (PIMAGE_POPUP_MENU_ITEM) + pPopup = (WORD*) ((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER)); while (1) { @@ -3063,7 +3065,7 @@ GetContentsOfMenu ( // normal case else { - pPopup = (PIMAGE_POPUP_MENU_ITEM) + pPopup = (WORD*) ((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER)); while (1) { @@ -3127,7 +3129,7 @@ GetContentsOfMenu ( // normal case else { - pPopup = (PIMAGE_POPUP_MENU_ITEM) + pPopup = (WORD*) ((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER)); while (1) { @@ -3174,7 +3176,7 @@ GetContentsOfMenu ( // normal case else { - pPopup = (PIMAGE_POPUP_MENU_ITEM) + pPopup = (WORD*) ((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER)); while (1) { @@ -3200,10 +3202,10 @@ PrintStrangeMenu ( char **psz) { - int i, j, k, l; + //int i, j, k, l; int num; - WORD flag1, flag2; - char buff[128]; + //WORD flag1, flag2; + //char buff[128]; char *ptr, *pmax; //return dumpMenu (psz, size); @@ -3395,17 +3397,17 @@ GetContentsOfDialog ( PIMAGE_RESOURCE_DIR_STRING_U pDialogName; PIMAGE_RESOURCE_DATA_ENTRY prData; PIMAGE_DIALOG_HEADER pDialogHeader; - PIMAGE_CONTROL_DATA pControlData; + //PIMAGE_CONTROL_DATA pControlData; char buff[32]; - int nCnt = 0, i, j; - int num = 0; + int /*nCnt = 0,*/ i, j; + //int num = 0; int size; int sLength, nDialogs; - WORD flag; + //WORD flag; WORD *pwd; - DWORD prdeName; - char *pMem, *pTemp; - BOOL isStrange = FALSE; + //DWORD prdeName; + char *pMem/*, *pTemp*/; + //BOOL isStrange = FALSE; /* get root directory of resource tree */ @@ -3580,7 +3582,7 @@ GetContentsOfDialog ( // October 14, 1997 // /* print contents of dialog */ -int WINAPI +void WINAPI PrintNameOrOrdinal ( char **psz) { @@ -3613,15 +3615,15 @@ PrintNameOrOrdinal ( // October 14, 1997 // /* print contents of dialog */ -int WINAPI +void WINAPI PrintDialog ( char **psz) { - int i, j, k, l, n, c; + int i/*, j, k, l, n, c*/; int num, size; DWORD flag; WORD class; - char buff[32]; + //char buff[32]; char *ptr, *pmax; BOOL isStrange = FALSE; @@ -3924,9 +3926,9 @@ main ( PIMAGE_FILE_HEADER pfh; PIMAGE_OPTIONAL_HEADER poh; PIMAGE_SECTION_HEADER psh; - IMAGE_SECTION_HEADER idsh; + //IMAGE_SECTION_HEADER idsh; IMAGE_SECTION_HEADER shdr[MAXSECTIONNUMBER]; - PIMAGE_IMPORT_MODULE_DIRECTORY pid; + //PIMAGE_IMPORT_MODULE_DIRECTORY pid; int nSections; // number of sections @@ -3945,10 +3947,10 @@ main ( int imageBase; int entryPoint; - int i, j, k, n; - int mnsize; - int nCnt; - int nSize; + int i, j, /*k,*/ n; + //int mnsize; + //int nCnt; + //int nSize; int fsize; char *pnstr; char *pst; diff --git a/rosapps/sysutils/tcat/cat.c b/rosapps/sysutils/tcat/cat.c index b3f72b9380d..405bef15061 100644 --- a/rosapps/sysutils/tcat/cat.c +++ b/rosapps/sysutils/tcat/cat.c @@ -18,7 +18,7 @@ void help(void) puts("Usage: cat [file]"); } -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { FILE *srcf; char *keys[]={"--help","/help"}; diff --git a/rosapps/sysutils/tlist/tlist.c b/rosapps/sysutils/tlist/tlist.c index 3a95d7dc0df..757f7708cad 100644 --- a/rosapps/sysutils/tlist/tlist.c +++ b/rosapps/sysutils/tlist/tlist.c @@ -1,4 +1,4 @@ -/* $Id: tlist.c,v 1.6 2003/08/03 18:06:02 ea Exp $ +/* $Id$ * * ReactOS Project * TList @@ -123,7 +123,7 @@ ProcessHasDescendants ( ++ Count; } } - (PBYTE) pInfo += pInfo->NextEntryDelta; + pInfo = (PSYSTEM_PROCESSES)((PBYTE)pInfo + pInfo->NextEntryDelta); } while (0 != pInfo->NextEntryDelta); @@ -201,7 +201,7 @@ PrintProcessAndDescendants ( } } } - (PBYTE) pInfo += pInfo->NextEntryDelta; + pInfo = (PSYSTEM_PROCESSES)((PBYTE)pInfo + pInfo->NextEntryDelta); } while (0 != pInfo->NextEntryDelta); diff --git a/rosapps/sysutils/win32err.c b/rosapps/sysutils/win32err.c index 421bdd87f64..36e01cd0498 100644 --- a/rosapps/sysutils/win32err.c +++ b/rosapps/sysutils/win32err.c @@ -1,4 +1,4 @@ -/* $Id: win32err.c,v 1.1 1999/05/16 07:27:35 ea Exp $ +/* $Id$ * * win32err.c * @@ -47,14 +47,14 @@ PrintWin32Error( DWORD ErrorCode ) { - LPVOID lpMsgBuf; + PVOID lpMsgBuf; FormatMessageW( (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM), NULL, ErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (PWCHAR) & lpMsgBuf, + (LPWSTR)& lpMsgBuf, 0, NULL ); diff --git a/rosapps/winfile/dialogs.c b/rosapps/winfile/dialogs.c index 59b56af57aa..167fca265b9 100644 --- a/rosapps/winfile/dialogs.c +++ b/rosapps/winfile/dialogs.c @@ -320,7 +320,7 @@ void AddFileInfoValue(HWND hDlg, void* pVersionData, struct LANGANDCODEPAGE lpTr wsprintf(SubBlock, TEXT("\\StringFileInfo\\%04x%04x\\%s"), lpTranslate.wLanguage, lpTranslate.wCodePage, info_str); // Retrieve file description for language and code page "i". - if (VerQueryValue(pVersionData, SubBlock, &pVal, &nValLen)) { + if (VerQueryValue(pVersionData, SubBlock, (PVOID)&pVal, &nValLen)) { ListBox_InsertItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), i, info_str); // ListBox_InsertItemData(pane->hwnd, idx, entry); SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, (LPARAM)pVal); @@ -375,7 +375,7 @@ void CheckForFileInfo(HWND hDlg, TCHAR* strFilename) UINT nValLen; // LPTSTR SubBlock = _T("\\"); _tcscpy(SubBlock, TEXT("\\")); - if (VerQueryValue(pVersionData, SubBlock, &pVal, &nValLen)) { + if (VerQueryValue(pVersionData, SubBlock, (PVOID)&pVal, &nValLen)) { if (nValLen == sizeof(VS_FIXEDFILEINFO)) { ShowFixedFileInfo(hDlg, (VS_FIXEDFILEINFO*)pVal); } diff --git a/rosapps/winfile/treeview.h b/rosapps/winfile/treeview.h index 2e05d4b4719..b89e8abf0b6 100644 --- a/rosapps/winfile/treeview.h +++ b/rosapps/winfile/treeview.h @@ -36,11 +36,6 @@ void UpdateStatus(HWND hWnd, Entry* pEntry); BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv); -#ifndef _MSC_VER -#define NMTVDISPINFO TV_DISPINFO -#define NMTVDISPINFO TV_DISPINFO -#endif - void OnGetDispInfo(NMTVDISPINFO* ptvdi);