From 42996aab8a643d4e1ed2259a716cd5aa52fbb0c1 Mon Sep 17 00:00:00 2001 From: Abel Calluaud <abel.calluaud@protonmail.com> Date: Tue, 11 Jun 2024 17:06:52 +0200 Subject: [PATCH] Fix compilation errors --- CMakeLists.txt | 4 ++-- src/util.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb97134..73ef78b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,9 +141,9 @@ find_library(M_LIBRARIES m) # Warning flags # ======================== include(CheckCCompilerFlag) -check_c_compiler_flag("-Werror -Wall -Wno-unused-result -Wno-sign-compare" HAVE_GCC_WARNING_FLAGS) +check_c_compiler_flag("-Wall -Wno-unused-result -Wno-sign-compare" HAVE_GCC_WARNING_FLAGS) if(HAVE_GCC_WARNING_FLAGS) - SET(CMAKE_C_FLAGS "-Werror -Wall -Wno-unused-result -Wno-sign-compare ${CMAKE_C_FLAGS}") + SET(CMAKE_C_FLAGS "-Wall -Wno-unused-result -Wno-sign-compare ${CMAKE_C_FLAGS}") endif() # ======================== diff --git a/src/util.c b/src/util.c index f0f3165..22dbb78 100644 --- a/src/util.c +++ b/src/util.c @@ -185,7 +185,8 @@ static double MpfAtof(const char *str) { /* Handle optional sign */ negative = 0; switch (*p) { - case '-': negative = 1; /* Fall through to increment position */ + case '-': negative = 1; + /* Fall through to increment position */ case '+': p++; } @@ -226,7 +227,8 @@ static double MpfAtof(const char *str) { /* Handle optional sign */ negative = 0; switch(*++p) { - case '-': negative = 1; /* Fall through to increment pos */ + case '-': negative = 1; + /* Fall through to increment position */ case '+': p++; } -- GitLab