Don't overwrite SDL_dynapi.h in checker-buildbot.sh.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 19 Mar 2014 16:02:25 -0400
changeset 8640 89bab8249c74
parent 8639 21093d07b958
child 8641 c576c104923b
Don't overwrite SDL_dynapi.h in checker-buildbot.sh.
build-scripts/checker-buildbot.sh
src/dynapi/SDL_dynapi.h
--- a/build-scripts/checker-buildbot.sh	Wed Mar 19 15:25:27 2014 -0400
+++ b/build-scripts/checker-buildbot.sh	Wed Mar 19 16:02:25 2014 -0400
@@ -8,8 +8,6 @@
 # And download checker at http://clang-analyzer.llvm.org/ and unpack it in
 #  /usr/local ... update CHECKERDIR as appropriate.
 
-# this currently expects a mercurial working copy that it can modify a little.
-
 FINALDIR="$1"
 
 CHECKERDIR="/usr/local/checker-276"
@@ -53,10 +51,6 @@
 cd `dirname "$0"`
 cd ..
 
-# Turn off the dynamic API. Makes the analysis output clearer.
-echo '#pragma once' >src/dynapi/SDL_dynapi.h
-echo '#define SDL_DYNAMIC_API 0' >>src/dynapi/SDL_dynapi.h
-
 rm -rf checker-buildbot analysis
 if [ ! -z "$FINALDIR" ]; then
     rm -rf "$FINALDIR"
@@ -84,7 +78,6 @@
 fi
 
 rm -rf checker-buildbot
-hg revert src/dynapi/SDL_dynapi.h
 
 echo "Done. Final output is in '$FINALDIR' ..."
 
--- a/src/dynapi/SDL_dynapi.h	Wed Mar 19 15:25:27 2014 -0400
+++ b/src/dynapi/SDL_dynapi.h	Wed Mar 19 16:02:25 2014 -0400
@@ -47,6 +47,8 @@
 #define SDL_DYNAMIC_API 0
 #elif SDL_BUILDING_WINRT /* probaly not useful on WinRT, given current .dll loading restrictions */
 #define SDL_DYNAMIC_API 0
+#elif defined(__clang_analyzer__)
+#define SDL_DYNAMIC_API 0  /* Turn off for static analysis, so reports are more clear. */
 #else   /* everyone else. */
 #define SDL_DYNAMIC_API 1
 #endif