From d3cb5dcffdedf4b63702435ba82b981234aaf425 Mon Sep 17 00:00:00 2001 From: faluco Date: Wed, 6 May 2020 17:09:23 +0200 Subject: [PATCH] Start fixing clang 10.0.0 warnings. Disable -Werror temporarily. --- CMakeLists.txt | 8 ++++---- lib/src/phy/ch_estimation/test/chest_test_ul.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a87d5b5df..cdabc9660 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,10 +466,10 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR}) endif() # Add -Werror to C/C++ flags for newer compilers -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -endif() +#if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) +# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +#endif() message(STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}") message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}") diff --git a/lib/src/phy/ch_estimation/test/chest_test_ul.c b/lib/src/phy/ch_estimation/test/chest_test_ul.c index a8f5d6872..29d7fa7b7 100644 --- a/lib/src/phy/ch_estimation/test/chest_test_ul.c +++ b/lib/src/phy/ch_estimation/test/chest_test_ul.c @@ -182,7 +182,7 @@ int main(int argc, char** argv) /* Generate random input */ srslte_vec_cf_zero(input, num_re); for (i = 0; i < num_re; i++) { - input[i] = 0.5 - rand() / RAND_MAX + I * (0.5 - (float)rand() / RAND_MAX); + input[i] = 0.5 - rand() / (float)RAND_MAX + I * (0.5 - rand() / (float)RAND_MAX); } /* Generate channel and pass input through channel */