Skip to content
Permalink
Browse files

Fixed bug 3806 - Fixes for MSVC compiler warnings

Simon Hug

These are the remaining compiler warnings I see in the current tip cb049cae7c3c.

- SDL_test_log.c defines _CRT_SECURE_NO_WARNINGS without checking if it was already set.

- SDL_windowskeyboard.c converts integers to pointers without going over the (U)INT_PTR types. That bothers MSVC.
  • Loading branch information
slouken committed Sep 9, 2017
1 parent 0ddac33 commit e8059221bdbfefda2ad0a05bf2024a9fb14fd77e
Showing with 7 additions and 7 deletions.
  1. +1 −1 src/test/SDL_test_log.c
  2. +6 −6 src/video/windows/SDL_windowskeyboard.c
@@ -26,7 +26,7 @@
*/

/* quiet windows compiler warnings */
#if defined(_MSC_VER)
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
# define _CRT_SECURE_NO_WARNINGS
#endif

@@ -295,11 +295,11 @@ DEFINE_GUID(IID_ITfThreadMgrEx, 0x3E90ADE3,0x7594
#define IMEID_VER(id) ((id) & 0xffff0000)
#define IMEID_LANG(id) ((id) & 0x0000ffff)

#define CHT_HKL_DAYI ((HKL)0xE0060404)
#define CHT_HKL_NEW_PHONETIC ((HKL)0xE0080404)
#define CHT_HKL_NEW_CHANG_JIE ((HKL)0xE0090404)
#define CHT_HKL_NEW_QUICK ((HKL)0xE00A0404)
#define CHT_HKL_HK_CANTONESE ((HKL)0xE00B0404)
#define CHT_HKL_DAYI ((HKL)(UINT_PTR)0xE0060404)
#define CHT_HKL_NEW_PHONETIC ((HKL)(UINT_PTR)0xE0080404)
#define CHT_HKL_NEW_CHANG_JIE ((HKL)(UINT_PTR)0xE0090404)
#define CHT_HKL_NEW_QUICK ((HKL)(UINT_PTR)0xE00A0404)
#define CHT_HKL_HK_CANTONESE ((HKL)(UINT_PTR)0xE00B0404)
#define CHT_IMEFILENAME1 "TINTLGNT.IME"
#define CHT_IMEFILENAME2 "CINTLGNT.IME"
#define CHT_IMEFILENAME3 "MSTCIPHA.IME"
@@ -312,7 +312,7 @@ DEFINE_GUID(IID_ITfThreadMgrEx, 0x3E90ADE3,0x7594
#define IMEID_CHT_VER60 (LANG_CHT | MAKEIMEVERSION(6, 0))
#define IMEID_CHT_VER_VISTA (LANG_CHT | MAKEIMEVERSION(7, 0))

#define CHS_HKL ((HKL)0xE00E0804)
#define CHS_HKL ((HKL)(UINT_PTR)0xE00E0804)
#define CHS_IMEFILENAME1 "PINTLGNT.IME"
#define CHS_IMEFILENAME2 "MSSCIPYA.IME"
#define IMEID_CHS_VER41 (LANG_CHS | MAKEIMEVERSION(4, 1))

0 comments on commit e805922

Please sign in to comment.