@cryptotaxi247 / netdata-1 / commits / 222b9dcb0

Suppress a handful of known warnings during the build process. (#20102)

* Fix various build-time warnings. * Get rid of warnings when building ndsudo. * Get rid of warnings when building vendored libsensors. * Fix incorrect type for curl timeouts.

Austin S. Hemmelgarn committed Jan 7, 2026 at 09:34 UTC 222b9dcb0823ce79b2186e0dc81ccb9dc3affaf5
3 files changed +6 -4
CMakeLists.txt
+4 -1
@@ -1458,6 +1458,7 @@ if(ENABLE_ML)
1458 if(NOT ENABLE_MIMALLOC)
1459 list(APPEND ML_FILES src/ml/ml_memory.cc)
1460 endif()
1461 + set_source_files_properties(${ML_FILES} PROPERTIES COMPILE_OPTIONS "-Wno-attributes")
1462 else()
1463 set(ML_FILES
1464 src/ml/ml_public.h
@@ -2139,7 +2140,7 @@ set(ACLK_FILES
2140 src/aclk/schema-wrappers/agent_cmds.cc
2141 src/aclk/schema-wrappers/agent_cmds.h
2142 )
2142 -
2143 +set_source_files_properties(src/aclk/schema-wrappers/proto_2_json.cc PROPERTIES COMPILE_OPTIONS "-Wno-unused-result")
2144
2145 set(MONGODB_EXPORTING_FILES
2146 src/exporting/mongodb/mongodb.c
@@ -2186,6 +2187,7 @@ set_source_files_properties(JudyLTables.c PROPERTIES COMPILE_OPTIONS "-I${CMAKE_
2187 #
2188
2189 add_library(libnetdata STATIC ${LIBNETDATA_FILES})
2190 +set_source_files_properties(src/libnetdata/gorilla/gorilla.cc PROPERTIES COMPILE_OPTIONS "-Wno-attributes")
2191
2192 target_include_directories(libnetdata BEFORE PUBLIC ${CONFIG_H_DIR} ${CMAKE_SOURCE_DIR}/src)
2193
@@ -2722,6 +2724,7 @@ if(NEED_NDSUDO)
2724 install(TARGETS ndsudo
2725 COMPONENT netdata
2726 DESTINATION usr/libexec/netdata/plugins.d)
2727 + set_source_files_properties(${NDSUDO_FILES} PROPERTIES COMPILE_OPTIONS "-Wno-unused-result")
2728 endif()
2729
2730 if(ENABLE_PLUGIN_CGROUP_NETWORK)
src/claim/claim-with-api.c
+2 -2
@@ -268,8 +268,8 @@ static bool send_curl_request(const char *machine_guid, const char *hostname, co
268 }
269
270 // Set timeout options
271 - curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);
272 - curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5);
271 + curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);
272 + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5L);
273
274 // execute the request
275 res = curl_easy_perform(curl);
src/collectors/debugfs.plugin/libsensors/CMakeLists.txt
-1
@@ -43,7 +43,6 @@ target_include_directories(vendored_libsensors PUBLIC
43 # Compile definitions
44 target_compile_definitions(vendored_libsensors PRIVATE
45 ETCDIR="/etc" # Define ETCDIR
46 - _GNU_SOURCE # Define GNU extensions
46 )
47
48 # Suppress warnings for Flex and Bison files