From 4525dff4d9af672116d8c6c182707f2ad6295b2d Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 8 Feb 2024 08:20:08 +0000 Subject: [PATCH 1/2] Add missing headers reported by `gcc-13` Without the change the build fails against `gcc-13` as: gimx.c:587:3: error: incompatible implicit declaration of built-in function 'free' [-Werror=builtin-declaration-mismatch] 587 | free(gimx_params.homedir); | ^~~~ --- core/config_reader.c | 1 + core/gimx.c | 1 + 2 files changed, 2 insertions(+) diff --git a/core/config_reader.c b/core/config_reader.c index 451fc486..803e697c 100644 --- a/core/config_reader.c +++ b/core/config_reader.c @@ -3,6 +3,7 @@ License: GPLv3 */ +#include #include #include "config_reader.h" #include diff --git a/core/gimx.c b/core/gimx.c index 700cae94..76b11644 100755 --- a/core/gimx.c +++ b/core/gimx.c @@ -7,6 +7,7 @@ #include //to catch SIGINT #include //to print errors #include //to print errors +#include //free() #include //PATH_MAX #ifndef WIN32 From f11855fcb8bd9d0cb9c94871b4111ddfd5b610df Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 8 Feb 2024 08:23:52 +0000 Subject: [PATCH 2/2] controller.c: fix `adapter_detect()` prototype consistency WIthout the change the build of `gcc-13` fails as: controller.c:922:15: error: conflicting types for 'adapter_detect' due to enum/integer mismatch; have 'e_gimx_status()' [-Werror=enum-int-mismatch] 922 | e_gimx_status adapter_detect() | ^~~~~~~~~~~~~~ --- core/controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/controller.h b/core/controller.h index b0db84bc..f0e5a212 100644 --- a/core/controller.h +++ b/core/controller.h @@ -82,7 +82,7 @@ typedef struct { int mperiod; } s_adapter; -int adapter_detect(); +e_gimx_status adapter_detect(); int adapter_start(); int adapter_send(); e_gimx_status adapter_clean();