[Konsole-devel] [Bug 101559] konsole compile errors on amd64 with gcc4

Kurt V.Hindenburg kurt.hindenburg at kdemail.net
Mon Mar 28 19:38:44 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=101559         
kurt.hindenburg kdemail net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From kurt.hindenburg kdemail net  2005-03-28 21:38 -------
CVS commit by hindenburg: 

Fix compile errors on amd64 with gcc4

BUG: 101559 


  M +5 -4      keytrans.cpp   1.51


--- kdebase/konsole/konsole/keytrans.cpp  #1.50:1.51
 @ -27,4 +27,5  @
 
 #include <stdio.h>
+#include <stddef.h>
 
 #ifndef HERE
 @ -373,5 +374,5  @ Loop:
     getSymbol(); assertSyntax(sym == SYMName, "Name expected")
     assertSyntax(syms->keysyms[res], "Unknown key name")
-    int key = (long)( syms->keysyms[res] ) -1;
+    ptrdiff_t key = (ptrdiff_t)(syms->keysyms[res]) - 1;
 //printf(" key %s (%04x)",res.latin1(),(int)syms->keysyms[res]-1);
     getSymbol(); // + - :
 @ -385,5 +386,5  @ Loop:
       assertSyntax(sym == SYMName, "Name expected")
       assertSyntax(syms->modsyms[res], "Unknown mode name")
-      int bits = (long)syms->modsyms[res]-1;
+      ptrdiff_t bits = (ptrdiff_t)(syms->modsyms[res]) - 1;
       if (mask & (1 << bits))
       {
 @ -402,9 +403,9  @ Loop:
     // string or command
     assertSyntax(sym == SYMName || sym == SYMString,"Command or string expected")
-    int cmd = 0;
+    ptrdiff_t cmd = 0;
     if (sym == SYMName)
     {
       assertSyntax(syms->oprsyms[res], "Unknown operator name")
-      cmd = (long)syms->oprsyms[res]-1;
+      cmd = (ptrdiff_t)(syms->oprsyms[res]) - 1;
 //printf(": do %s(%d)",res.latin1(),(int)syms->oprsyms[res]-1);
     }



More information about the konsole-devel mailing list