Fix Clang build

Change-Id: I0b51699c0a1368cf5813bd9d3cd4479139d23d6a
This commit is contained in:
Alex Voicu
2019-04-12 12:23:21 +03:00
committed by Kent Russell
parent 0045974858
commit fdadae6745
3 changed files with 7 additions and 3 deletions
+5 -2
View File
@@ -63,7 +63,10 @@ set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUIL
#set ( CMAKE_VERBOSE_MAKEFILE on )
## Compiler flags
set (HSAKMT_C_FLAGS -fPIC -W -Wall -Wextra -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden)
set (HSAKMT_C_FLAGS -fPIC -W -Wall -Wextra -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden)
if ( CMAKE_COMPILER_IS_GNUCC )
set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -Wlogical-op)
endif ()
if ( "${CMAKE_C_COMPILER_VERSION}" STRGREATER "4.8.0")
set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -Werror )
endif ()
@@ -133,7 +136,7 @@ add_custom_target ( build-dev
-DHSAKMT_BIN_NAME="${HSAKMT}"
WORKING_DIRECTORY ${DEV_BUILD_DIR} )
## Custom targets for the devel package
## Custom targets for the devel package
add_custom_target ( install-dev DEPENDS build-dev COMMAND make install WORKING_DIRECTORY ${DEV_BUILD_DIR} )
add_custom_target ( package-dev DEPENDS build-dev
COMMAND rm -rf *.deb *.rpm *.tar.gz
+1
View File
@@ -277,6 +277,7 @@ static inline HsaSharedMemoryStruct *to_hsa_shared_memory_struct(
return (HsaSharedMemoryStruct *)SharedMemoryHandle;
}
__attribute__((unused))
static inline HsaSharedMemoryHandle *to_hsa_shared_memory_handle(
HsaSharedMemoryStruct *SharedMemoryStruct)
{
+1 -1
View File
@@ -67,7 +67,7 @@ extern int PAGE_SHIFT;
#define ALIGN_UP(x,align) (((uint64_t)(x) + (align) - 1) & ~(uint64_t)((align)-1))
#define ALIGN_UP_32(x,align) (((uint32_t)(x) + (align) - 1) & ~(uint32_t)((align)-1))
#define PAGE_ALIGN_UP(x) ALIGN_UP(x,PAGE_SIZE)
#define BITMASK(n) (((n) < sizeof(1ULL) * CHAR_BIT ? (1ULL << (n)) : 0) - 1ULL)
#define BITMASK(n) ((n) ? (UINT64_MAX >> (sizeof(UINT64_MAX) * CHAR_BIT - n)) : n)
#define ARRAY_LEN(array) (sizeof(array) / sizeof(array[0]))
/* HSA Thunk logging usage */