Author Topic: compilergcc.cpp:1454:48: warning: comparison between signed and unsigned integer  (Read 3415 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Hello,
for a long time: each compilation 'Code :: Blocks', I get this warning
Quote
compilergcc.cpp:1454:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
So I decided to give you a fix on svn11286 :
Quote
Index: plugins/compilergcc/compilergcc.cpp
===================================================================
--- plugins/compilergcc/compilergcc.cpp   (rĂ©vision 11263)
+++ plugins/compilergcc/compilergcc.cpp   (copie de travail)
@@ -1441,7 +1441,7 @@
         // fill the menu and combo
         for (size_t x = 0; x < m_Targets.GetCount(); ++x)
         {
-            if (m_TargetMenu && x < maxTargetInMenus)
+            if (m_TargetMenu && x < static_cast<size_t>(maxTargetInMenus))
             {
                 wxString help;
                 help.Printf(_("Build target '%s' in current project"), GetTargetString(x).wx_str());
@@ -1451,7 +1451,7 @@
                 m_pToolTarget->Append(GetTargetString(x));
         }
 
-        if (m_TargetMenu && m_Targets.size() > maxTargetInMenus)
+        if (m_TargetMenu && m_Targets.size() > static_cast<size_t>(maxTargetInMenus) )
         {
             m_TargetMenu->Append(idMenuSelectTargetHasMore, _("More targets available..."),
                                  _("Use the select target menu item to see them!"));


Vista Business, wxWidgets-2.8.12, TdmGcc.4.7.1

See you soon.

CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Patches posted on the forum most of the times get lost. If you really want the patch to get in it is better to post it in the tickets section on sf.net.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]