Author: cazfi
Date: Thu Apr 16 19:56:43 2015
New Revision: 28791

URL: http://svn.gna.org/viewcvs/freeciv?rev=28791&view=rev
Log:
Fixed compiler warning about "always true" array address checking if() 

See bug #23483

Modified:
    branches/S2_5/client/gui-sdl/widget_edit.c

Modified: branches/S2_5/client/gui-sdl/widget_edit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/widget_edit.c?rev=28791&r1=28790&r2=28791&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/widget_edit.c  (original)
+++ branches/S2_5/client/gui-sdl/widget_edit.c  Thu Apr 16 19:56:43 2015
@@ -558,22 +558,20 @@
         pEdt->pInputChain->prev->chr[0] = Key.unicode;        
        pEdt->pInputChain->prev->chr[1] = '\0';
 
-       if (pEdt->pInputChain->prev->chr) {
-         if (get_wflags(pEdt->pWidget) & WF_PASSWD_EDIT) {
-           Uint16 passwd_chr[2] = {'*', '\0'};
-           
-           pEdt->pInputChain->prev->pTsurf =
-             TTF_RenderUNICODE_Blended(pEdt->pWidget->string16->font,
-                                         passwd_chr,
-                                         pEdt->pWidget->string16->fgcol);
-         } else {
-           pEdt->pInputChain->prev->pTsurf =
-             TTF_RenderUNICODE_Blended(pEdt->pWidget->string16->font,
-                                         pEdt->pInputChain->prev->chr,
-                                         pEdt->pWidget->string16->fgcol);
-         }
-         pEdt->Truelength += pEdt->pInputChain->prev->pTsurf->w;
-       }
+        if (get_wflags(pEdt->pWidget) & WF_PASSWD_EDIT) {
+          Uint16 passwd_chr[2] = {'*', '\0'};
+
+          pEdt->pInputChain->prev->pTsurf =
+            TTF_RenderUNICODE_Blended(pEdt->pWidget->string16->font,
+                                      passwd_chr,
+                                      pEdt->pWidget->string16->fgcol);
+        } else {
+          pEdt->pInputChain->prev->pTsurf =
+            TTF_RenderUNICODE_Blended(pEdt->pWidget->string16->font,
+                                      pEdt->pInputChain->prev->chr,
+                                      pEdt->pWidget->string16->fgcol);
+        }
+        pEdt->Truelength += pEdt->pInputChain->prev->pTsurf->w;
 
        if (pEdt->InputChain_X >= pEdt->pWidget->size.x + pEdt->pBg->w - 
adj_size(10)) {
          if (pEdt->pInputChain == pEdt->pEndTextChain) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to