Fix a few msvc warnings
Modified: trunk/reactos/apps/utils/net/tracert/tracert.c
Modified: trunk/reactos/apps/utils/net/tracert/tracert.h
_____
Modified: trunk/reactos/apps/utils/net/tracert/tracert.c
--- trunk/reactos/apps/utils/net/tracert/tracert.c 2005-12-27
18:47:11 UTC (rev 20375)
+++ trunk/reactos/apps/utils/net/tracert/tracert.c 2005-12-27
18:59:13 UTC (rev 20376)
@@ -69,21 +69,7 @@
INT iHostList; // -j @UNIMPLEMENTED@
INT iTimeOut = 2000; // -w time before packet times out
-/* function definitions */
-static BOOL ParseCmdline(int argc, char* argv[]);
-static INT Driver(void);
-static INT Setup(INT ttl);
-static VOID SetupTimingMethod(void);
-static VOID ResolveHostname(void);
-static VOID PreparePacket(INT packetSize, INT seqNum);
-static INT SendPacket(INT datasize);
-static INT ReceivePacket(INT datasize);
-static INT DecodeResponse(INT packetSize, INT seqNum);
-static LONG GetTime(void);
-static WORD CheckSum(PUSHORT data, UINT size);
-static VOID Usage(void);
-
/*
*
* Parse command line parameters and set any options
@@ -137,7 +123,7 @@
{
INT iHopCount = 1; // hop counter. default max is 30
- INT iSeqNum = 0; // initialise packet sequence
number
+ USHORT iSeqNum = 0; // initialise packet sequence
number
INT iTTL = 1; // set initial packet TTL to 1
BOOL bFoundTarget = FALSE; // Have we reached our destination
yet
BOOL bAwaitPacket; // indicates whether we have
recieved a good packet
@@ -433,7 +419,7 @@
* Calculate the packet checksum
*
*/
-static VOID PreparePacket(INT iPacketSize, INT iSeqNum)
+static VOID PreparePacket(INT iPacketSize, USHORT iSeqNum)
{
/* assemble ICMP echo request packet */
sendpacket.icmpheader.type = ECHO_REQUEST;
@@ -480,8 +466,8 @@
if (WSAGetLastError() == WSAEACCES)
{
_tprintf(_T("\n\nYou must be an administrator to run this
program!\n\n"));
- exit(1);
WSACleanup();
+ exit(1);
}
else
{
@@ -584,7 +570,7 @@
* It all is well, print the time taken for the round trip.
*
*/
-static INT DecodeResponse(INT iPacketSize, INT iSeqNum)
+static INT DecodeResponse(INT iPacketSize, USHORT iSeqNum)
{
unsigned short header_len = recvpacket.h_len * 4;
/* cast the recieved packet into an ECHO reply and a TTL Exceed so
we can check the ID*/
@@ -645,7 +631,7 @@
*
*/
-static LONG GetTime(VOID)
+static LONGLONG GetTime(VOID)
{
LARGE_INTEGER Time;
_____
Modified: trunk/reactos/apps/utils/net/tracert/tracert.h
--- trunk/reactos/apps/utils/net/tracert/tracert.h 2005-12-27
18:47:11 UTC (rev 20375)
+++ trunk/reactos/apps/utils/net/tracert/tracert.h 2005-12-27
18:59:13 UTC (rev 20376)
@@ -68,3 +68,16 @@
/* return to normal */
#include <poppack.h>
+/* function definitions */
+static BOOL ParseCmdline(int argc, char* argv[]);
+static INT Driver(void);
+static INT Setup(INT ttl);
+static VOID SetupTimingMethod(void);
+static VOID ResolveHostname(void);
+static VOID PreparePacket(INT packetSize, USHORT seqNum);
+static INT SendPacket(INT datasize);
+static INT ReceivePacket(INT datasize);
+static INT DecodeResponse(INT packetSize, USHORT seqNum);
+static LONGLONG GetTime(void);
+static WORD CheckSum(PUSHORT data, UINT size);
+static VOID Usage(void);
Show replies by date