Browse Source

HPCC-2695 More clang warnings

Fixed warnings generated by Clang compiler in jlib.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
bc8af1d483
3 changed files with 2 additions and 2 deletions
  1. 1 0
      cmake_modules/commonSetup.cmake
  2. 1 1
      system/jlib/jdebug.cpp
  3. 0 1
      system/jlib/jutil.cpp

+ 1 - 0
cmake_modules/commonSetup.cmake

@@ -191,6 +191,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
     if (CMAKE_COMPILER_IS_CLANGXX)
       SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=logical-op-parentheses -Werror=bool-conversions -Werror=return-type -Werror=comment")
       SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -Werror=bitwise-op-parentheses -Werror=tautological-compare")
+      SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -Wno-switch-enum")
     endif()
     # All of these are defined in platform.h too, but need to be defned before any system header is included
     ADD_DEFINITIONS (-D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64=1 -D__USE_FILE_OFFSET64=1)

+ 1 - 1
system/jlib/jdebug.cpp

@@ -862,7 +862,7 @@ memsize_t getMapInfo(const char *type)
         if (strstr(ln, typeStr.str()))
         {
             unsigned __int64 addrLow, addrHigh;
-            if (2 == sscanf(ln, "%16Lx-%16Lx", &addrLow, &addrHigh))
+            if (2 == sscanf(ln, "%16lx-%16lx", &addrLow, &addrHigh))
             {
                 ret = (memsize_t)(addrHigh-addrLow);
                 break;

+ 0 - 1
system/jlib/jutil.cpp

@@ -1697,7 +1697,6 @@ static void buffer_destroy(void * buf)
 static void buffer_key_alloc()
 {
     pthread_key_create(&buffer_key, buffer_destroy);
-    DBGLOG("buffer_key=%d", buffer_key);
 }
 
 // Allocate the thread-specific buffer