From a4d2244300ac0cc0293968aabd56d477beb3ebd7 Mon Sep 17 00:00:00 2001 From: uis Date: Sat, 11 Nov 2023 17:37:20 +0300 Subject: [PATCH] Fix printf formats --- gowin/pack.cc | 3 ++- himbaechel/uarch/gowin/globals.cc | 2 +- himbaechel/uarch/gowin/pack.cc | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gowin/pack.cc b/gowin/pack.cc index 00b5fee2..d89992cc 100644 --- a/gowin/pack.cc +++ b/gowin/pack.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include "cells.h" #include "design_utils.h" #include "log.h" @@ -672,7 +673,7 @@ static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constne uc_init &= (1LL << uc_init_len) - 1; if (ctx->verbose) - log_info("%s lut config modified from 0x%lX to 0x%lX\n", ctx->nameOf(uc), it_param->second.intval, + log_info("%s lut config modified from 0x%" PRIX64 " to 0x%" PRIX64 "\n", ctx->nameOf(uc), it_param->second.intval, uc_init); it_param->second = Property(uc_init, uc_init_len); diff --git a/himbaechel/uarch/gowin/globals.cc b/himbaechel/uarch/gowin/globals.cc index a34d4253..c818f762 100644 --- a/himbaechel/uarch/gowin/globals.cc +++ b/himbaechel/uarch/gowin/globals.cc @@ -246,7 +246,7 @@ struct GowinGlobalRouter IdStringList pin_func = gwu.get_pin_funcs(driver.cell->bel); for (size_t i = 0; i < pin_func.size(); ++i) { if (ctx->debug) { - log_info("bel:%s, pin func: %lu:%s\n", ctx->nameOfBel(driver.cell->bel), i, + log_info("bel:%s, pin func: %zu:%s\n", ctx->nameOfBel(driver.cell->bel), i, pin_func[i].str(ctx).c_str()); } if (pin_func[i].str(ctx).rfind("GCLKT", 0) == 0) { diff --git a/himbaechel/uarch/gowin/pack.cc b/himbaechel/uarch/gowin/pack.cc index 83975af2..621c7fff 100644 --- a/himbaechel/uarch/gowin/pack.cc +++ b/himbaechel/uarch/gowin/pack.cc @@ -10,6 +10,8 @@ #include "gowin_utils.h" #include "pack.h" +#include + NEXTPNR_NAMESPACE_BEGIN namespace { @@ -881,7 +883,7 @@ struct GowinPacker uc_init &= (1LL << uc_init_len) - 1; if (ctx->verbose && it_param->second.intval != uc_init) - log_info("%s lut config modified from 0x%lX to 0x%lX\n", ctx->nameOf(uc), + log_info("%s lut config modified from 0x%" PRIX64 " to 0x%" PRIX64 "\n", ctx->nameOf(uc), it_param->second.intval, uc_init); it_param->second = Property(uc_init, uc_init_len);