summaryrefslogtreecommitdiff
path: root/src/inc/ex.h
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-02-06 04:31:14 -0800
committerJan Vorlicek <janvorli@microsoft.com>2015-02-06 04:31:14 -0800
commit2646f6c12a46f859ba35fafa2a42576741443eb3 (patch)
tree5dadc2374fe0e0de9f70bd22828b270bcfc8248a /src/inc/ex.h
parent89d4ba21430c0be10b5fb8287d8fca6f8a941c5e (diff)
downloadcoreclr-2646f6c12a46f859ba35fafa2a42576741443eb3.tar.gz
coreclr-2646f6c12a46f859ba35fafa2a42576741443eb3.tar.bz2
coreclr-2646f6c12a46f859ba35fafa2a42576741443eb3.zip
Fix several warnings in Linux build
1) Usage of partially uninitialized variable when the compiler didn't know the condition is always true. This condition was calling a VolatileRead and only the VolatileRead actually matters so that right PDB annotation is generated and not optimized out in debug optimized builds. So I've removed the if. 2) Usage of nostdinc++ option as a general option - it complained when building C files 3) Usage of an unknown warning disabling compiler option with clang 3.5. The option was needed for clang 3.5.1 and later. 4) Usage of partially uninitialized variable in daccess.cpp - there is a code path that the compiler can see that doesn't initialize the status variable. 5) Empty body of a for loop warning in one or two PAL tests. [tfs-changeset: 1411579]
Diffstat (limited to 'src/inc/ex.h')
-rw-r--r--src/inc/ex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inc/ex.h b/src/inc/ex.h
index e86cf402ca..8babb687b1 100644
--- a/src/inc/ex.h
+++ b/src/inc/ex.h
@@ -977,7 +977,7 @@ Exception *ExThrowWithInnerHelper(Exception *inner);
CAutoTryCleanup<STATETYPE> __autoCleanupTry(__state); \
/* prevent annotations from being dropped by optimizations in debug */ \
INDEBUG(static bool __alwayszero;) \
- INDEBUG(if(!VolatileLoad(&__alwayszero))) \
+ INDEBUG(VolatileLoad(&__alwayszero);) \
{ \
/* this is necessary for Rotor exception handling to work */ \
DEBUG_ASSURE_NO_RETURN_BEGIN(EX_TRY) \