[PATCH 3/3] Fix gcc -Werror=enum-int-mismatch

arthur at aheymans.xyz arthur at aheymans.xyz
Wed Jul 12 08:37:50 UTC 2023


From: Arthur Heymans <arthur at aheymans.xyz>

GCC 13 added a warning about mismatches between an enumerated type and
an integer type in declarations.

Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
 src/lib/include/fwts_cpu.h       | 2 +-
 src/lib/include/fwts_memorymap.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/include/fwts_cpu.h b/src/lib/include/fwts_cpu.h
index f5f66108..b023c5e3 100644
--- a/src/lib/include/fwts_cpu.h
+++ b/src/lib/include/fwts_cpu.h
@@ -63,7 +63,7 @@ int fwts_cpu_is_Intel(bool *is_intel);
 int fwts_cpu_is_AMD(bool *is_amd);
 int fwts_cpu_is_Hygon(bool *is_hygon);
 
-int fwts_cpu_has_c1e(void);
+fwts_bool fwts_cpu_has_c1e(void);
 fwts_cpuinfo_x86 *fwts_cpu_get_info(const int which_cpu);
 void fwts_cpu_free_info(fwts_cpuinfo_x86 *cpu);
 
diff --git a/src/lib/include/fwts_memorymap.h b/src/lib/include/fwts_memorymap.h
index f79113b9..b2a39705 100644
--- a/src/lib/include/fwts_memorymap.h
+++ b/src/lib/include/fwts_memorymap.h
@@ -38,7 +38,7 @@ typedef struct {
 } fwts_memory_map_entry;
 
 int        fwts_memory_map_type(fwts_list *memory_map_list, const uint64_t memory);
-int        fwts_memory_map_is_reserved(fwts_list *memory_map_list, const uint64_t memory);
+fwts_bool  fwts_memory_map_is_reserved(fwts_list *memory_map_list, const uint64_t memory);
 fwts_list *fwts_memory_map_table_load(fwts_framework *fw);
 void       fwts_memory_map_table_free(fwts_list *memory_map_list);
 void       fwts_memory_map_table_dump(fwts_framework *fw, fwts_list *memory_map_list);
-- 
2.41.0




More information about the fwts-devel mailing list