clear a number of Qt build warnings on linux related to compiler flags

option ‘-Wimplicit’ is valid for C/ObjC but not for C++
option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
option ‘-Wmissing-parameter-type’ is valid for C/ObjC but not for C++
option ‘-Wold-style-definition’ is valid for C/ObjC but not for C++
option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
This commit is contained in:
nhmall
2021-02-03 13:18:43 -05:00
parent c5b74aee63
commit 8b21a170fb
3 changed files with 40 additions and 29 deletions

View File

@@ -31,11 +31,13 @@
#define ACTIVATE_WARNING_PRAGMAS
#endif
#endif
#if defined(__clang__) && defined(__cplusplus)
#if defined(__GNUC__) || defined(__clang__)
#if defined(__cplusplus)
#ifndef ACTIVATE_WARNING_PRAGMAS
#define ACTIVATE_WARNING_PRAGMAS
#endif
#endif
#endif /* __cplusplus */
#endif /* __GNUC__ || __clang__ */
#ifdef ACTIVATE_WARNING_PRAGMAS
#if defined(__clang__)
@@ -89,6 +91,7 @@
#endif /* DISABLE_WARNING_PRAGMAS */
#if !defined(STDC_Pragma_AVAILABLE)
#error not good
#define DISABLE_WARNING_UNREACHABLE_CODE
#define DISABLE_WARNING_FORMAT_NONLITERAL
#define DISABLE_WARNING_CONDEXPR_IS_CONSTANT