diff --git a/reactos/base/services/tftpd/tftpd.cpp b/reactos/base/services/tftpd/tftpd.cpp index b03c606927a..3ea918f6463 100644 --- a/reactos/base/services/tftpd/tftpd.cpp +++ b/reactos/base/services/tftpd/tftpd.cpp @@ -111,7 +111,6 @@ void WINAPI ServiceMain(DWORD /*argc*/, TCHAR* /*argv*/[]) init(); fd_set readfds; timeval tv; - int fdsReady = 0; tv.tv_sec = 20; tv.tv_usec = 0; @@ -297,7 +296,6 @@ void printWindowsError() if (dw) { LPVOID lpMsgBuf; - LPVOID lpDisplayBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | @@ -309,7 +307,7 @@ void printWindowsError() (LPTSTR) &lpMsgBuf, 0, NULL ); - printf("Error: %s\nPress Enter..\n", lpMsgBuf); + printf("Error: %p\nPress Enter..\n", lpMsgBuf); getchar(); } } @@ -864,7 +862,7 @@ void processRequest(void *lpParam) val = blksize; req.blksize = val; - sprintf(outPtr, "%u", val); + sprintf(outPtr, "%lu", val); outPtr += strlen(outPtr) + 1; } else if (!strcasecmp(inPtr, "tsize")) @@ -880,7 +878,7 @@ void processRequest(void *lpParam) if (ftell(req.file) >= 0) { req.tsize = ftell(req.file); - sprintf(outPtr, "%u", req.tsize); + sprintf(outPtr, "%lu", req.tsize); outPtr += strlen(outPtr) + 1; } else @@ -908,7 +906,7 @@ void processRequest(void *lpParam) else { req.tsize = 0; - sprintf(outPtr, "%u", req.tsize); + sprintf(outPtr, "%lu", req.tsize); outPtr += strlen(outPtr) + 1; } } @@ -926,7 +924,7 @@ void processRequest(void *lpParam) req.timeout = val; req.expiry = time(NULL) + req.timeout; - sprintf(outPtr, "%u", val); + sprintf(outPtr, "%lu", val); outPtr += strlen(outPtr) + 1; } @@ -1221,7 +1219,7 @@ void processRequest(void *lpParam) } else { - sprintf(req.serverError.errormessage, "%u Blocks Served", req.fblock - 1); + sprintf(req.serverError.errormessage, "%lu Blocks Served", req.fblock - 1); logMess(&req, 2); req.attempt = UCHAR_MAX; break; @@ -1316,7 +1314,7 @@ void processRequest(void *lpParam) { fclose(req.file); req.file = 0; - sprintf(req.serverError.errormessage, "%u Blocks Received", req.fblock); + sprintf(req.serverError.errormessage, "%lu Blocks Received", req.fblock); logMess(&req, 2); req.attempt = UCHAR_MAX; break; @@ -1812,7 +1810,7 @@ void init() } else { - sprintf(logBuff, "Section [HOME], alias name too large", name); + sprintf(logBuff, "Section [HOME], alias %s too large", name); logMess(logBuff, 1); } } @@ -2106,7 +2104,7 @@ void init() if (lEvent == NULL) { - printf("CreateEvent error: %d\n", GetLastError()); + printf("CreateEvent error: %lu\n", GetLastError()); exit(-1); } else if ( GetLastError() == ERROR_ALREADY_EXISTS ) @@ -2124,7 +2122,7 @@ void init() if (tEvent == NULL) { - printf("CreateEvent error: %d\n", GetLastError()); + printf("CreateEvent error: %lu\n", GetLastError()); exit(-1); } else if ( GetLastError() == ERROR_ALREADY_EXISTS ) @@ -2142,7 +2140,7 @@ void init() if (sEvent == NULL) { - printf("CreateEvent error: %d\n", GetLastError()); + printf("CreateEvent error: %lu\n", GetLastError()); exit(-1); } else if ( GetLastError() == ERROR_ALREADY_EXISTS ) @@ -2160,7 +2158,7 @@ void init() if (cEvent == NULL) { - printf("CreateEvent error: %d\n", GetLastError()); + printf("CreateEvent error: %lu\n", GetLastError()); exit(-1); } else if ( GetLastError() == ERROR_ALREADY_EXISTS ) @@ -2195,8 +2193,6 @@ void logMess(char *logBuff, BYTE logLevel) { WaitForSingleObject(lEvent, INFINITE); - char tempbuff[256]; - if (verbatim) printf("%s\n", logBuff); else if (cfig.logfile && logLevel <= cfig.logLevel)