Fix Clang compiler error and warnings

This commit is contained in:
Hugues Delorme 2016-02-12 11:45:46 +01:00
parent bd5a6cde4e
commit b42e2b36ee
2 changed files with 8 additions and 0 deletions

View File

@ -240,6 +240,12 @@ if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
# Specific flags for Clang
if(CMAKE_COMPILER_IS_CLANG)
# Clang on apple-darwin13.4.0 wrongly reports many unused functions
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
endif()
# Specific flags for Visual C++
if(MSVC)
# Treat all files a C source files

View File

@ -35,6 +35,8 @@ GMIO_INLINE void gmio_cross_product_f64(
* Implementation
*/
#include <math.h>
void gmio_cross_product_f32(
float ux, float uy, float uz,
float vx, float vy, float vz,