I see an alert message when C::B start in the latest rev 12996.
This patch try to fix it.
From 63c1c31529667c9985c4ab96087ef1bf591f0e70 Mon Sep 17 00:00:00 2001
From: asmwarrior <a@b.com>
Date: Sun, 30 Oct 2022 13:39:30 +0800
Subject: use the %llu for unsigned long long value, otherwise, an alert will
happen
diff --git a/src/sdk/toolsmanager.cpp b/src/sdk/toolsmanager.cpp
index 616fb2d1..ac6395bf 100644
--- a/src/sdk/toolsmanager.cpp
+++ b/src/sdk/toolsmanager.cpp
@@ -264,7 +264,7 @@ void ToolsManager::LoadTools()
AddTool(&tool, false);
}
- Manager::Get()->GetLogManager()->Log(wxString::Format(_("Configured %d tools"), m_Tools.GetCount()));
+ Manager::Get()->GetLogManager()->Log(wxString::Format(_("Configured %llu tools"), m_Tools.GetCount()));
}
void ToolsManager::SaveTools()
My question is: why the old F() function does not show the alert message box?
This a diagnostic from the compiler (or wxWidgets), it knows how printf() works but nothing about F().
I did not see this because I am working with 32 bits, I will fix it in trunk.
Fixed in r12997 (https://sourceforge.net/p/codeblocks/code/12997/).
Quote from: Miguel Gimenez on October 30, 2022, 09:51:40 AM
Fixed in r12997 (https://sourceforge.net/p/codeblocks/code/12997/).
Just a nitpick, sorry. IMO, the correct solution would be to use "%zu". %zu is the natural formatter for size_t returned by GetCount() / size() methods of std(-like) containers, hence no cast is required and the formatter works regardless of 32/64-bit builds. It has been supported by wxWidgets since a long time.
Corrected in r12998, thank you.
@PB, @Miguel Gimenez
Thanks.