Author: sserapion Date: Mon Jul 28 09:50:17 2008 New Revision: 34906
URL: http://svn.reactos.org/svn/reactos?rev=34906&view=rev Log: Warning and error fixes.
Modified: branches/ros-amd64-bringup/reactos/base/applications/calc/winmain.c branches/ros-amd64-bringup/reactos/base/applications/network/ftp/cmds.c branches/ros-amd64-bringup/reactos/base/applications/network/ftp/fake.h branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp.c branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp_var.h branches/ros-amd64-bringup/reactos/base/applications/network/ftp/main.c branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild branches/ros-amd64-bringup/reactos/base/applications/network/ping/ping.c branches/ros-amd64-bringup/reactos/base/applications/network/tracert/tracert.c branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.c branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.h
Modified: branches/ros-amd64-bringup/reactos/base/applications/calc/winmain.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/calc/winmain.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/calc/winmain.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -854,7 +854,7 @@ return str; }
-static LRESULT CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +static INT_PTR CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { TCHAR buffer[SIZEOF(calc.buffer)]; DWORD n; @@ -1224,7 +1224,7 @@ return 1L; }
-static LRESULT CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { unsigned int x; RECT rc;
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/ftp/cmds.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/ftp/cmds.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/ftp/cmds.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -417,7 +417,7 @@ if (!*tp) { tp = cp; tp2 = tmpbuf; - while ((*tp2 = *tp) != (int) NULL) { + while ((*tp2 = *tp)) { if (isupper(*tp2)) { *tp2 = 'a' + *tp2 - 'A'; } @@ -574,7 +574,7 @@ if (!*tp) { tp = argv[2]; tp2 = tmpbuf; - while ((*tp2 = *tp) != (int) NULL) { + while ((*tp2 = *tp)) { if (isupper(*tp2)) { *tp2 = 'a' + *tp2 - 'A'; } @@ -716,7 +716,7 @@ if (!*tp) { tp = cp; tp2 = tmpbuf; - while ((*tp2 = *tp) != (int) NULL) { + while ((*tp2 = *tp)) { if (isupper(*tp2)) { *tp2 = 'a' + *tp2 - 'A'; } @@ -1687,7 +1687,7 @@ if (!connected) return; (void) command("QUIT"); - cout = (int) NULL; + cout = 0; connected = 0; data = -1; if (!proxy) {
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/ftp/fake.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/ftp/fake.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/ftp/fake.h [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -9,9 +9,4 @@ #define strcasecmp strcmp #define strncasecmp strnicmp
-struct timezone { - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -int gettimeofday(struct timeval *tv, struct timezone *tz); +void __cdecl _tzset(void);
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -295,7 +295,7 @@ printf("\n"); (void) fflush(stdout); } - if (cout == (int) NULL) { + if (cout == 0) { perror ("No control connection for command"); code = -1; return (0); @@ -583,7 +583,7 @@ return; } dout = dataconn(mode); - if (dout == (int)NULL) + if (!dout) goto abort; (void) gettimeofday(&start, (struct timezone *)0); null();// oldintp = signal(SIGPIPE, SIG_IGN); @@ -888,7 +888,7 @@ } } din = dataconn("r"); - if (din == (int)NULL) + if (!din) goto abort; if (strcmp(local, "-") == 0) fout = stdout; @@ -1272,7 +1272,7 @@ if (s < 0) { perror("ftp: accept"); (void) closesocket(data), data = -1; - return (int) (NULL); + return 0; } if(closesocket(data)) { int iret=WSAGetLastError ();
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp_var.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp_var.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/ftp/ftp_var.h [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -2,6 +2,7 @@ #include "fake.h" #include "prototypes.h" #include <setjmp.h> +#include <sys/time.h>
//typedef void (*Sig_t)(int);
@@ -48,11 +49,6 @@ #define STRU_F 1 #define STRU_R 2 #define STRU_P 3 - -#define SIGQUIT 1 -#define SIGPIPE 2 -#define SIGALRM 3 -
#define FORM_N 1 #define FORM_T 2
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/ftp/main.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/ftp/main.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/ftp/main.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -264,9 +264,9 @@ extern int data;
if (connected) { - if (cout != (int) NULL) { + if (cout) { closesocket(cout); - cout = (int) NULL; + cout = 0; } if (data >= 0) { (void) shutdown(data, 1+1); @@ -277,9 +277,9 @@ } pswitch(1); if (connected) { - if (cout != (int)NULL) { + if (cout) { closesocket(cout); - cout = (int) NULL; + cout = 0; } connected = 0; } @@ -538,7 +538,7 @@ char *argv[]; { extern struct cmd cmdtab[]; - register struct cmd *c; + struct cmd *c;
if (argc == 1) { register int i, j, w, k; @@ -591,7 +591,7 @@ else if (c == (struct cmd *)0) printf("?Invalid help command %s\n", arg); else - printf("%-*s\t%s\n", HELPINDENT, + printf("%-*s\t%s\n", (int)HELPINDENT, c->c_name, c->c_help); } (void) fflush(stdout);
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -28,9 +28,7 @@ <directory name="route"> <xi:include href="route/route.rbuild" /> </directory> - <directory name="telnet"> - <xi:include href="telnet/telnet.rbuild" /> - </directory> + <directory name="tracert"> <xi:include href="tracert/tracert.rbuild" /> </directory>
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/ping/ping.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/ping/ping.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/ping/ping.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -233,7 +233,7 @@ DataSize = GetULONG2(&argv[i][2], argv[i + 1], &i); if (DataSize > ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET)) { - printf("Bad value for option -l, valid range is from 0 to %d.\n", + printf("Bad value for option -l, valid range is from 0 to %I64d.\n", ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET)); return FALSE; } @@ -466,7 +466,7 @@ }
- printf("Reply from %s: bytes=%d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr), + printf("Reply from %s: bytes=%I64d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr), size - IphLength - sizeof(ICMP_ECHO_PACKET), Sign, Time, IpHeader->TTL); if (RelativeTime.QuadPart < MinRTT.QuadPart || !MinRTTSet) {
Modified: branches/ros-amd64-bringup/reactos/base/applications/network/tracert/tracert.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/tracert/tracert.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/tracert/tracert.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -396,7 +396,7 @@ DebugPrint(_T("Rouge packet: header id, process id %d"), TTLExceedHdr->OrigIcmpHeader.id, GetCurrentProcessId()); return -1; } - _tprintf(_T("%3Ld ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart); + _tprintf(_T("%3I64d ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart); return 0;
case ECHO_REPLY : @@ -407,7 +407,7 @@ DebugPrint(_T("Rouge packet: header id %d, process id %d"), IcmpHdr->icmpheader.id, GetCurrentProcessId()); return -1; } - _tprintf(_T("%3Ld ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart); + _tprintf(_T("%3I64d ms"), (pInfo->lTimeEnd - pInfo->lTimeStart) / pInfo->TicksPerMs.QuadPart); return 1;
case DEST_UNREACHABLE :
Modified: branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.c [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -928,7 +928,7 @@ #ifdef _MSC_VER #pragma warning(disable : 4100) #endif -BOOL CALLBACK +INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { HWND hLicenseEditWnd;
Modified: branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/a... ============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/notepad/dialog.h [iso-8859-1] Mon Jul 28 09:50:17 2008 @@ -55,7 +55,7 @@
VOID DIALOG_TimeDate(VOID);
-BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* utility functions */ VOID ShowLastError(void);