Skip to content

Commit

Permalink
Clang build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
perim committed Apr 28, 2017
1 parent ef37bca commit 3e224b7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 3rdparty/glm/core/type_half.inl
Expand Up @@ -135,9 +135,9 @@ namespace detail
// of float and half (127 versus 15).
//

register int s = (i >> 16) & 0x00008000;
register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
register int m = i & 0x007fffff;
int s = (i >> 16) & 0x00008000;
int e = ((i >> 23) & 0x000000ff) - (127 - 15);
int m = i & 0x007fffff;

//
// Now reassemble s, e and m into a half:
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Expand Up @@ -334,6 +334,11 @@ elif test "x$enable_debug" = "xsanitize-address" ; then
WZ_CXXFLAGS="${WZ_CXXFLAGS} -ggdb -Os -fno-omit-frame-pointer ${WZ_WARNINGS_GCC_CXX} -Werror -fsanitize=address"
WZ_CPPFLAGS="${WZ_CPPFLAGS} -DDEBUG"
LDFLAGS="${LDFLAGS} -fsanitize=address -lpthread"
elif test "x$enable_debug" = "xsanitize-thread" ; then
WZ_CFLAGS="${WZ_CFLAGS} -ggdb -Os -fno-omit-frame-pointer ${WZ_WARNINGS_GCC_C} -Werror -fsanitize=thread"
WZ_CXXFLAGS="${WZ_CXXFLAGS} -ggdb -Os -fno-omit-frame-pointer ${WZ_WARNINGS_GCC_CXX} -Werror -fsanitize=thread"
WZ_CPPFLAGS="${WZ_CPPFLAGS} -DDEBUG"
LDFLAGS="${LDFLAGS} -fsanitize=thread -lpthread"
# normal, non-debug build
else
WZ_CFLAGS="${WZ_CFLAGS} -g ${WZ_WARNINGS_GCC_C}"
Expand Down
3 changes: 2 additions & 1 deletion lib/netplay/netplay.cpp
Expand Up @@ -1783,7 +1783,8 @@ static void NETcheckPlayers(void)
// We should not block here.
bool NETrecvNet(NETQUEUE *queue, uint8_t *type)
{
switch (upnp_status)
const int status = upnp_status; // hack fix for clang and c++11 - fixed in standard for c++14
switch (status)
{
case UPNP_ERROR_CONTROL_NOT_AVAILABLE:
case UPNP_ERROR_DEVICE_NOT_FOUND:
Expand Down

0 comments on commit 3e224b7

Please sign in to comment.