From bc2075846e91ef8326c0003d8378c3bdd1f66623 Mon Sep 17 00:00:00 2001 From: zilmar Date: Wed, 13 Sep 2017 20:10:09 +1000 Subject: [PATCH] [Project64] Fix some warnings with wtl --- Source/Project64/WTLApp.h | 53 +++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/Source/Project64/WTLApp.h b/Source/Project64/WTLApp.h index ad1e6dbb8..f5b485def 100644 --- a/Source/Project64/WTLApp.h +++ b/Source/Project64/WTLApp.h @@ -9,33 +9,22 @@ * * ****************************************************************************/ #pragma once -//#define _WIN32_WINNT 0x0500 +#pragma warning(push) +#pragma warning(disable : 4091) // warning C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared +#pragma warning(disable : 4201) // warning C4201: nonstandard extension used: nameless struct/union +#pragma warning(disable : 4302) // warning C4302: 'type cast': truncation from 'LPCTSTR' to 'WORD' +#pragma warning(disable : 4458) // warning C4458: declaration of 'dwCommonButtons' hides class member +#pragma warning(disable : 4838) // warning C4838: conversion from 'int' to 'UINT' requires a narrowing conversion +#pragma warning(disable : 4996) // warning C4996: 'GetVersionExA': was declared deprecated #define _ATL_DISABLE_NOTHROW_NEW #include #include -#pragma warning(push) -#pragma warning(disable : 4996) // warning C4996: 'GetVersionExA': was declared deprecated -#include -#pragma warning(pop) - -class CPj64Module : - public CAppModule -{ -public: - CPj64Module(void) - { - Init(NULL, GetModuleHandle(NULL)); - } - virtual ~CPj64Module(void) - { - Term(); - } -}; - - -extern CPj64Module _Module; +#include +#include +#include +#include #define _WTL_NO_CSTRING @@ -43,9 +32,23 @@ extern CPj64Module _Module; #include #include -#include -#include -#include +#pragma warning(pop) + +class CPj64Module : + public CAppModule +{ +public: + CPj64Module(void) + { + Init(NULL, GetModuleHandle(NULL)); + } + virtual ~CPj64Module(void) + { + Term(); + } +}; + +extern CPj64Module _Module; #include