diff --git a/base/applications/network/telnet/src/tnconfig.cpp b/base/applications/network/telnet/src/tnconfig.cpp index 105b8294110..351463acd01 100644 --- a/base/applications/network/telnet/src/tnconfig.cpp +++ b/base/applications/network/telnet/src/tnconfig.cpp @@ -547,7 +547,7 @@ void TConfig::keyfile_init() { // if there is no environment variable GetPrivateProfileString("Keyboard", "Keyfile", "", keyfile, sizeof(keyfile), inifile); - if(keyfile == 0 || *keyfile == 0) { + if (!*keyfile) { // and there is no profile string strcpy(keyfile, startdir); if (sizeof(keyfile) >= strlen(keyfile)+strlen("telnet.cfg")) { diff --git a/base/applications/wordpad/wordpad.c b/base/applications/wordpad/wordpad.c index 8b4f3c00e28..dd44a213e1c 100644 --- a/base/applications/wordpad/wordpad.c +++ b/base/applications/wordpad/wordpad.c @@ -2046,9 +2046,9 @@ static LRESULT OnNotify( HWND hWnd, LPARAM lParam) update_font_list(); - sprintf( buf,"selection = %d..%d, line count=%ld", + sprintf( buf,"Selection: %d..%d | Lines: %u", pSC->chrg.cpMin, pSC->chrg.cpMax, - SendMessageW(hwndEditor, EM_GETLINECOUNT, 0, 0)); + (UINT)SendMessageW(hwndEditor, EM_GETLINECOUNT, 0, 0)); SetWindowTextA(GetDlgItem(hWnd, IDC_STATUSBAR), buf); SendMessageW(hWnd, WM_USER, 0, 0); return 1; diff --git a/dll/win32/dbghelp/symbol.c b/dll/win32/dbghelp/symbol.c index 2265add7fc8..bfdc76a121b 100644 --- a/dll/win32/dbghelp/symbol.c +++ b/dll/win32/dbghelp/symbol.c @@ -19,7 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef NONAMELESSUNION /* Required to avoid a warning when NOT CMAKE_CROSSCOMPILING */ #define NONAMELESSUNION +#endif #include #include diff --git a/modules/rostests/apitests/shell32/SHChangeNotify.cpp b/modules/rostests/apitests/shell32/SHChangeNotify.cpp index e853baa875f..6e7d7b89a67 100644 --- a/modules/rostests/apitests/shell32/SHChangeNotify.cpp +++ b/modules/rostests/apitests/shell32/SHChangeNotify.cpp @@ -213,7 +213,7 @@ static void DoStepCheck(INT iStage, INT iStep, LPCSTR checks) } LPCSTR answer = NULL; - INT lineno; + INT lineno = 0; switch (iStage) { case 0: @@ -285,11 +285,7 @@ static void DoStepCheck(INT iStage, INT iStep, LPCSTR checks) } break; } - default: - { - assert(0); - break; - } + DEFAULT_UNREACHABLE; } ok(lstrcmpA(checks, answer) == 0, diff --git a/modules/rostests/apitests/shell32/ShellExecCmdLine.cpp b/modules/rostests/apitests/shell32/ShellExecCmdLine.cpp index ef06fd9ee79..d5be3f8e3fd 100644 --- a/modules/rostests/apitests/shell32/ShellExecCmdLine.cpp +++ b/modules/rostests/apitests/shell32/ShellExecCmdLine.cpp @@ -28,7 +28,6 @@ #define shell32_hInstance GetModuleHandle(NULL) #define IDS_FILE_NOT_FOUND (-1) -static const WCHAR wszOpen[] = L"open"; static const WCHAR wszExe[] = L".exe"; static const WCHAR wszCom[] = L".com"; diff --git a/modules/rostests/apitests/shell32/shell32_apitest_sub.cpp b/modules/rostests/apitests/shell32/shell32_apitest_sub.cpp index 09c46b3465c..2b11420e0e7 100644 --- a/modules/rostests/apitests/shell32/shell32_apitest_sub.cpp +++ b/modules/rostests/apitests/shell32/shell32_apitest_sub.cpp @@ -91,8 +91,8 @@ static BOOL InitSHCN(HWND hwnd) assert(s_iStage < NUM_STAGE); SHChangeNotifyEntry entry; - INT sources; - LONG events; + INT sources = 0; + LONG events = EVENTS; switch (s_iStage) { case 0: @@ -176,11 +176,7 @@ static BOOL InitSHCN(HWND hwnd) events = EVENTS; break; } - default: - { - assert(0); - break; - } + DEFAULT_UNREACHABLE; } s_uRegID = SHChangeNotifyRegister(hwnd, sources, events, WM_SHELL_NOTIFY, 1, &entry); diff --git a/sdk/include/psdk/ddraw.h b/sdk/include/psdk/ddraw.h index a7d01b54363..9e6ad4fa66d 100644 --- a/sdk/include/psdk/ddraw.h +++ b/sdk/include/psdk/ddraw.h @@ -2,17 +2,17 @@ #ifndef __DDRAW_INCLUDED__ #define __DDRAW_INCLUDED__ -#if defined(_WIN32) && !defined(_NO_COM ) -#define COM_NO_WINDOWS_H -#include +#if defined(_WIN32) && !defined(_NO_COM) + #define COM_NO_WINDOWS_H + #include #else -#define IUnknown void -#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) - #ifndef CO_E_NOTINITIALIZED /* Avoid conflict warning with _HRESULT_TYPEDEF_(0x800401F0L) in winerror.h */ - #define CO_E_NOTINITIALIZED 0x800401F0L + #define IUnknown void + #if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) + #ifndef CO_E_NOTINITIALIZED /* Avoid conflict warning with _HRESULT_TYPEDEF_(0x800401F0L) in winerror.h */ + #define CO_E_NOTINITIALIZED 0x800401F0L + #endif #endif #endif -#endif #define _FACDD 0x876 diff --git a/sdk/include/reactos/wine/test.h b/sdk/include/reactos/wine/test.h index 92c03508c61..f1e80c4f77e 100644 --- a/sdk/include/reactos/wine/test.h +++ b/sdk/include/reactos/wine/test.h @@ -764,7 +764,7 @@ const char *wine_dbgstr_guid( const GUID *guid ) if (!guid) return "(null)"; res = get_temp_buffer( 39 ); /* CHARS_IN_GUID */ sprintf( res, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], + (unsigned int)guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); return res; diff --git a/sdk/lib/crt/startup/gs_support.c b/sdk/lib/crt/startup/gs_support.c index a8027b38c7a..c724065e99d 100644 --- a/sdk/lib/crt/startup/gs_support.c +++ b/sdk/lib/crt/startup/gs_support.c @@ -29,7 +29,7 @@ typedef LONG NTSTATUS; /* same as in ntdef.h / winternl.h */ -#define UNW_FLAG_NHANDLER 0x00 +#define UNW_FLAG_NHANDLER 0x0 typedef union { diff --git a/subsystems/mvdm/ntvdm/dos/dos32krnl/country.c b/subsystems/mvdm/ntvdm/dos/dos32krnl/country.c index 334c04c20f4..8f39e7d07d8 100644 --- a/subsystems/mvdm/ntvdm/dos/dos32krnl/country.c +++ b/subsystems/mvdm/ntvdm/dos/dos32krnl/country.c @@ -212,7 +212,7 @@ WORD DosIfCharYesNo(WORD Char) if (Char == YesNoTable[0]) return 0x0001; /* Unknown type */ - return 0x0002; + return 0x0002; } CHAR DosToUpper(CHAR Char)