From 76b558c83175610f913703c565105bf035e5e089 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Sun, 14 Apr 2013 10:26:42 +0200 Subject: [PATCH] Closes bug 1168753. Depending on build options seems that wx uses different types for size() so the Format string was not always correct. Put a fat warning in a comment too. --- eeschema/netlist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index d6c0471a8e..17437b1138 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -146,7 +146,11 @@ void SCH_EDIT_FRAME::BuildNetListBase() if( g_NetObjectslist.size() == 0 ) return; // no objects - activity += wxString::Format( _( " net count = %u" ), g_NetObjectslist.size() ); + /* Here wx gives its best... depending on the build option size can + be unsigned int or unsigned long (probably even size_t, but it doesn't + support the %z specifier). So the cast is for platform compability */ + activity += wxString::Format( _( " net count = %lu" ), + (unsigned long)( g_NetObjectslist.size() ) ); SetStatusText( activity ); /* Sort objects by Sheet */