forked from microsoft/AirSim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved out strict mode macros in separate file, added back some of the…
… missing changes after bad pull, added back pedantic, included better contribution guidelines
- Loading branch information
Showing
12 changed files
with
355 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef common_StrictMode_hpp | ||
#define common_StrictMode_hpp | ||
|
||
#if defined(_MSC_VER) | ||
//'=': conversion from 'double' to 'float', possible loss of data | ||
#define STRICT_MODE_OFF \ | ||
__pragma(warning(push)) \ | ||
__pragma(warning( disable : 4100 4189 4244 4245 4239 4464 4456 4505 4514 4571 4624 4626 4267 4710 4820 5027 5031)) | ||
#define STRICT_MODE_ON \ | ||
__pragma(warning(pop)) | ||
|
||
//TODO: limit scope of below statements required to suppress VC++ warnings | ||
#define _CRT_SECURE_NO_WARNINGS 1 | ||
#pragma warning(disable:4996) | ||
#endif | ||
|
||
|
||
#ifdef __GNUC__ | ||
#define STRICT_MODE_OFF \ | ||
_Pragma("GCC diagnostic push") \ | ||
_Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wdelete-non-virtual-dtor\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \ | ||
_Pragma("GCC diagnostic ignored \"-pedantic\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wshadow\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wold-style-cast\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wswitch-default\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wredundant-decls\"") | ||
|
||
/* Addition options that can be enabled | ||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wformat=\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Werror\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Werror=\"") \ | ||
_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \ | ||
*/ | ||
|
||
#define STRICT_MODE_ON \ | ||
_Pragma("GCC diagnostic pop") | ||
#endif | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.