From ce961ae5fb475c20e3165c43ad648e4e413c3c2a Mon Sep 17 00:00:00 2001 From: penfold42 Date: Wed, 3 Jan 2024 21:12:58 +1100 Subject: [PATCH] clean up minor compiler warnings (#79) set c99 on tests/CMakeLists.txt --- src/codecs/jtencode/lib/init_rs_int.cpp | 2 +- src/drivers/si4063/si4063.c | 2 ++ tests/CMakeLists.txt | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/codecs/jtencode/lib/init_rs_int.cpp b/src/codecs/jtencode/lib/init_rs_int.cpp index 404be31..a467f89 100644 --- a/src/codecs/jtencode/lib/init_rs_int.cpp +++ b/src/codecs/jtencode/lib/init_rs_int.cpp @@ -30,7 +30,7 @@ void * JTEncode::init_rs_int(int symsize, int gfpoly, int fcr, int prim, rs = ((struct rs *)0); /* Check parameter ranges */ - if(symsize < 0 || symsize > 8*sizeof(data_t)){ + if(symsize < 0 || (unsigned) symsize > 8*sizeof(data_t)){ goto done; } diff --git a/src/drivers/si4063/si4063.c b/src/drivers/si4063/si4063.c index a32317e..1f69d94 100644 --- a/src/drivers/si4063/si4063.c +++ b/src/drivers/si4063/si4063.c @@ -684,7 +684,9 @@ int si4063_init() void TIM1_BRK_TIM15_IRQHandler(void) { +#ifdef DFM17 static bool pin_state = false; +#endif if (TIM_GetITStatus(TIM15, TIM_IT_Update) != RESET) { TIM_ClearITPendingBit(TIM15, TIM_IT_Update); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8b2232b..f87754f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,6 +7,8 @@ project(RS41ng_test C CXX) set(BINARY ${CMAKE_PROJECT_NAME}) +SET(CMAKE_C_FLAGS "${COMMON_FLAGS} -std=gnu99") + file(GLOB_RECURSE USER_SOURCES "../src/config.c" "../src/codecs/*.c" "../src/template.c" "../src/utils.c" "../src/strlcpy.c") file(GLOB_RECURSE USER_SOURCES_CXX "../src/codecs/*.cpp") file(GLOB_RECURSE USER_HEADERS "../src/codecs/*.h" "../src/template.h" "../src/utils.h" "../src/config.h" "../src/strlcpy.h")