Navigation Menu

Skip to content

Commit

Permalink
Fixed bug 3806 - Fixes for MSVC compiler warnings
Browse files Browse the repository at this point in the history
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 e805922
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/test/SDL_test_log.c
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions src/video/windows/SDL_windowskeyboard.c
Expand Up @@ -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"
Expand All @@ -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))
Expand Down

0 comments on commit e805922

Please sign in to comment.