From b9594bb07bb765e0177637dbc5b876c6787bc359 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 31 Dec 2020 01:40:43 -0500 Subject: [PATCH] Use PRId64 for portability of printf format strings on Linux and Windows. --- include/common.hpp | 1 + src/app/RackWidget.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/common.hpp b/include/common.hpp index aadb3577..e52b7469 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index d052b773..b187e4d9 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -187,7 +187,7 @@ void RackWidget::mergeJson(json_t* rootJ) { // TODO Legacy v0.6? ModuleWidget* moduleWidget = getModule(id); if (!moduleWidget) { - WARN("Cannot find ModuleWidget with ID %lld", id); + WARN("Cannot find ModuleWidget with ID %" PRId64 "", id); continue; } @@ -212,7 +212,7 @@ void RackWidget::mergeJson(json_t* rootJ) { int64_t id = json_integer_value(idJ); CableWidget* cw = getCable(id); if (!cw) { - WARN("Cannot find CableWidget with ID %lld", id); + WARN("Cannot find CableWidget with ID %" PRId64 "", id); continue; } @@ -238,7 +238,7 @@ void RackWidget::fromJson(json_t* rootJ) { int64_t id = json_integer_value(idJ); engine::Module* module = APP->engine->getModule(id); if (!module) { - WARN("Cannot find module with ID %lld", id); + WARN("Cannot find module with ID %" PRId64 "", id); continue; } @@ -283,7 +283,7 @@ void RackWidget::fromJson(json_t* rootJ) { int64_t id = json_integer_value(idJ); engine::Cable* cable = APP->engine->getCable(id); if (!cable) { - WARN("Cannot find cable with ID %lld", id); + WARN("Cannot find cable with ID %" PRId64 "", id); continue; }