From ee3b6965f0184fa5bde8ed3a591e58dd85886a19 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sat, 14 May 2022 15:36:02 +0200 Subject: [PATCH] fix(part.hpp): use uint32_t instead of int for fpga_list index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This resulted in an error with GCC 12: In file included from src/main.cpp:29: src/part.hpp:148:1: error: narrowing conversion of ‘2165379139’ from ‘unsigned int’ to ‘int’ [-Wnarrowing] 148 | }; | ^ --- src/part.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/part.hpp b/src/part.hpp index 154ec29..a4a7973 100644 --- a/src/part.hpp +++ b/src/part.hpp @@ -6,6 +6,7 @@ #ifndef PART_HPP #define PART_HPP +#include #include #include @@ -17,7 +18,7 @@ typedef struct { } fpga_model; /* Highest nibble (version) must always be set to 0 */ -static std::map fpga_list = { +static std::map fpga_list = { {0x0a014c35, {"anlogic", "eagle s20", "EG4S20BG256", 8}}, {0x00004c37, {"anlogic", "elf2", "EF2M45", 8}},