From e4c947271abdbd7ef1fa8bbee4cb6ae3a46031fe Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Thu, 30 May 2024 12:40:27 +0200 Subject: FIX Minor gcc warning + more verbose build --- CMakeLists.txt | 10 ++++------ modules/benchmark/fftbench.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd094206..60d70903 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,6 @@ message(STATUS "LOCALEDIR = ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}") message(STATUS "Building HardInfo2 for architecture: ${HARDINFO2_OS}-${HARDINFO2_ARCH}") add_definitions("-std=gnu89") -#add_definitions("-Wno-deprecated-declarations") add_definitions("-Wextra") add_definitions("-Wno-missing-field-initializers") add_definitions("-Wformat") @@ -279,7 +278,6 @@ set(MODULE_devices_SOURCES modules/devices/printers.c modules/devices/resources.c modules/devices/sensors.c -# modules/devices/spd-decode.c modules/devices/storage.c modules/devices/usb.c ) @@ -316,7 +314,7 @@ set_source_files_properties( modules/benchmark/md5.c modules/benchmark/sha1.c PROPERTIES - COMPILE_FLAGS "-O0 -Werror=implicit-function-declaration" + COMPILE_FLAGS "-O0 -Wall -Wextra -Werror=implicit-function-declaration" ) set_source_files_properties( @@ -326,7 +324,7 @@ set_source_files_properties( hardinfo2/problem_marker.c hardinfo2/hinote_util.c PROPERTIES - COMPILE_FLAGS "-std=c99 -Wall -Wextra -Wno-unused-function -Wno-switch -Werror=implicit-function-declaration" + COMPILE_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-switch -Werror=implicit-function-declaration" ) foreach (_module ${HARDINFO2_MODULES}) @@ -355,7 +353,7 @@ add_library(sysobj_early STATIC deps/sysobj_early/src/format_early.c deps/sysobj_early/src/cpubits.c ) -set_target_properties(sysobj_early PROPERTIES COMPILE_FLAGS "-std=c99 -Wall -Wextra -Wno-parentheses -Wno-unused-function -Werror=implicit-function-declaration") +set_target_properties(sysobj_early PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Wno-parentheses -Wno-unused-function -Werror=implicit-function-declaration") target_link_libraries(sysobj_early m) if (HARDINFO2_GTK3) @@ -372,7 +370,7 @@ add_library(uber-graph STATIC deps/uber-graph/uber-timeout-interval.c deps/uber-graph/uber-window.c ) -set_target_properties(uber-graph PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Werror=implicit-function-declaration") +set_target_properties(uber-graph PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -Werror=implicit-function-declaration") endif() set_source_files_properties( diff --git a/modules/benchmark/fftbench.c b/modules/benchmark/fftbench.c index bfd42b98..fdb5434b 100644 --- a/modules/benchmark/fftbench.c +++ b/modules/benchmark/fftbench.c @@ -65,7 +65,7 @@ static const int NM1 = 99; // N - 1 static void lup_decompose(FFTBench *fftbench) { - int i, j, k, k2, t; + int i, j, k, k2=0, t; double p, temp, **a; int *perm = (int *) malloc(sizeof(double) * N); -- cgit v1.2.3