Fixed GCC mem-access warnings (#2565)

+ using "if defined" more consistently for Clang.
This commit is contained in:
omar
2019-05-19 17:15:14 +02:00
parent 31e3e861ef
commit f242cd4d8a
5 changed files with 22 additions and 13 deletions

View File

@ -63,7 +63,7 @@ Index of this file:
#ifdef _MSC_VER
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
#endif
#ifdef __clang__
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wold-style-cast" // warning : use of old-style cast // yes, they are more terse.
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // warning : 'xx' is deprecated: The POSIX name for this item.. // for strdup used in demo code (so user can copy & paste the code)
#pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" // warning : cast to 'void *' from smaller integer type 'int'