build: suppress ignoring return value warnings
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 4 Jan 2019 14:14:53 +0000 (15:14 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 4 Jan 2019 14:29:18 +0000 (15:29 +0100)
Suppress ignoring return value warnings to fix compile issues with gcc5
The is actually a bug in gcc5 as it does not recognize the no-format-truncation
option although it's silently accepted unless the source file under compilation
had already generated some warnings before.
Therefore suppress ignoring return value warnings which trigger the problem.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
CMakeLists.txt

index 24a18a2..85f97e1 100644 (file)
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
 
 PROJECT(mountd C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-format-truncation)
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unused-result -Wno-format-truncation)
 
 FIND_PATH(uci_include_dir uci.h)
 INCLUDE_DIRECTORIES(${uci_include_dir})