mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
Fix coverity scan triggered from travis
Update modeling file to deal with SDL2.0 changes
This commit is contained in:
1 parent
d60b756b4b
commit
41b0b53b85
2 files changed
+22
-47
No files matched your search
+4
-4
@@ -21,10 +21,8 @@ addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "scp-fs2open/fs2open.github.com"
|
||||
description: "Coverity via Travis CI"
|
||||
notification_email: [email protected]
|
||||
build_command_prepend: "./autogen.sh --enable-debug"
|
||||
build_command: "make -j2"
|
||||
build_command: "ci/travis/script.sh"
|
||||
# must match TRAVIS_BRANCH check below
|
||||
branch_pattern: coverity_scan
|
||||
deploy:
|
||||
@@ -50,6 +48,8 @@ env:
|
||||
global:
|
||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
||||
# via the "travis encrypt" command using the project repo's public key
|
||||
# also note that fork's don't get access to secure keys
|
||||
# you have to test using a branch in the main repo
|
||||
- secure: "C3wF967ZeliwwP1vC12EMIBOaC568n26Z/cPnwzn317ve59DWH3YSfPZVgvt08GzmaXITGGsJvPB+qxfGoKvQzYE4O1B73q81RpUe5pB3IhF+ThQ91VfQZIRJR5xEGJaLINUlHTTZGX5jxlkVO9wAcauVj/s3b8sQ3dvUZauPvk="
|
||||
matrix:
|
||||
include:
|
||||
@@ -90,4 +90,4 @@ before_script:
|
||||
script:
|
||||
- if [ "$BUILD_DEPLOYMENT" = true ] ; then ./ci/travis/release.sh ; else ./ci/travis/script.sh ; fi
|
||||
before_deploy:
|
||||
- "./ci/travis/before_deploy.sh"
|
||||
- "./ci/travis/before_deploy.sh"
|
||||
+18
-43
@@ -2,48 +2,23 @@
|
||||
* Coverity Scan modeling file. Help reduce false positives
|
||||
*/
|
||||
|
||||
// Assert & Assertion are "killpaths" in DEBUG, but not release
|
||||
// This should get them treated as killpaths in release as well
|
||||
// (just a copy of the DEBUG version of the macros)
|
||||
|
||||
void WinAssert(char * text, char *filename, int line)
|
||||
/*
|
||||
* In theory these fatal errors can allow execution to continue, because we give an option to open the debugger when they occur
|
||||
* However, Coverity should treat these as killpaths, since users should never pick the debug option
|
||||
* These two should cover Error, Assert & Assertion (and maybe others, I haven't done an exhaustive check)
|
||||
*/
|
||||
namespace os
|
||||
{
|
||||
__coverity_panic__();
|
||||
namespace dialogs
|
||||
{
|
||||
void Error(const char* text)
|
||||
{
|
||||
__coverity_panic__();
|
||||
}
|
||||
|
||||
void AssertMessage(const char * text, const char * filename, int linenum, const char * format, ...)
|
||||
{
|
||||
__coverity_panic__();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WinAssert(char * text, char *filename, int line, const char * format, ... )
|
||||
{
|
||||
__coverity_panic__();
|
||||
}
|
||||
|
||||
# define Assert(expr) do {\
|
||||
if (!(expr)) {\
|
||||
WinAssert(#expr,__FILE__,__LINE__);\
|
||||
}\
|
||||
ASSUME( expr );\
|
||||
} while (0)
|
||||
|
||||
# ifndef _MSC_VER // non MS compilers
|
||||
# define Assertion(expr, msg, ...) do {\
|
||||
if (!(expr)) {\
|
||||
WinAssert(#expr,__FILE__,__LINE__, msg , ##__VA_ARGS__ );\
|
||||
}\
|
||||
} while (0)
|
||||
# else
|
||||
# if _MSC_VER >= 1400 // VC 2005 or greater
|
||||
# define Assertion(expr, msg, ...) do {\
|
||||
if (!(expr)) {\
|
||||
WinAssert(#expr,__FILE__,__LINE__, msg, __VA_ARGS__ );\
|
||||
}\
|
||||
ASSUME(expr);\
|
||||
} while (0)
|
||||
# else // older MSVC compilers
|
||||
# define Assertion(expr, msg) do {\
|
||||
if (!(expr)) {\
|
||||
WinAssert(#expr,__FILE__,__LINE__);\
|
||||
}\
|
||||
} while (0)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user