Fix linux warnings

This commit is contained in:
Johannes Schriewer 2018-08-05 18:39:15 +02:00
parent 5f3becb99c
commit fffcd3500d
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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);