From fffcd3500d1198a7e8e0a36a1502ea4f3b9850bd Mon Sep 17 00:00:00 2001 From: Johannes Schriewer Date: Sun, 5 Aug 2018 18:39:15 +0200 Subject: [PATCH] Fix linux warnings --- CMakeLists.txt | 4 ++-- platform/linux.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2da2a5c..36283a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,8 @@ configure_file ( # Build flags # if (UNIX) - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -fprofile-arcs -ftest-coverage -O0 -pthread -DDEBUG=1") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Os -pthread") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Wno-unused-parameter -fprofile-arcs -ftest-coverage -O0 -pthread -DDEBUG=1") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wno-unused-parameter -Os -pthread") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-lgcov") endif() # UNIX diff --git a/platform/linux.c b/platform/linux.c index 55d279d..3f934a4 100644 --- a/platform/linux.c +++ b/platform/linux.c @@ -34,7 +34,8 @@ struct _PlatformData { int sock; }; -void *timer_task(MQTTHandle *handle) { +PlatformTaskFunc(timer_task) { + MQTTHandle *handle = (MQTTHandle *)context; while (1) { platform_sleep(1000);