Joost 't Hart wrote:
Hi!

This is the output of Linux build (CVS), right?

g++ -O4 -fno-rtti -fno-exceptions -Wall -I/usr/include/tcl8.5 -o src/misc.o -c src/misc.cpp
src/misc.cpp: In function ‘char* my_Tcl_Alloc(int)’:
src/misc.cpp:96: error: cast from ‘char*’ to ‘unsigned int’ loses precision
src/misc.cpp: In function ‘char* my_Tcl_AttemptAlloc(int)’:
src/misc.cpp:109: error: cast from ‘char*’ to ‘unsigned int’ loses precision
src/misc.cpp: In function ‘char* my_Tcl_Realloc(char*, int)’:
src/misc.cpp:118: error: cast from ‘char*’ to ‘unsigned int’ loses precision
src/misc.cpp:118: error: cast from ‘char*’ to ‘unsigned int’ loses precision
src/misc.cpp: In function ‘void my_Tcl_Free(char*)’:
src/misc.cpp:129: error: cast from ‘char*’ to ‘unsigned int’ loses precision
make: *** [src/misc.o] Error 1


Please fix.

Attached a patch that does it.

Joost.

Cheers,
Joost.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev _______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users


? Makefile
? pgnfix
? pgnscid
? sc_addmove
? sc_eco
? sc_epgn
? sc_import
? sc_remote
? sc_spell
? sc_tree
? scid
? scidlet
? scidpgn
? scidt
? scmerge
? spf2spi
? spliteco
? tcscid
? tkscid
? engines/phalanx-scid/phalanx-scid
? engines/togaII1.2.1a/src/.depend
? engines/togaII1.2.1a/src/togaII
Index: src/misc.cpp
===================================================================
RCS file: /cvsroot/scid/scid/src/misc.cpp,v
retrieving revision 1.6
diff -U3 -r1.6 misc.cpp
--- src/misc.cpp        6 Jan 2010 17:17:24 -0000       1.6
+++ src/misc.cpp        10 Jan 2010 16:56:07 -0000
@@ -93,7 +93,7 @@
   char * buf = Tcl_AttemptAlloc(size);
 #ifndef POCKET
   if (logMemory)
-    printf("Alloc %u %d\n", (unsigned int) buf, size );
+    printf("Alloc %lu %d\n", (unsigned long) buf, size );
 #endif
   if (buf == NULL) {
     Tcl_Eval(currentTclInterp, "tk_messageBox -type ok -icon error -parent . 
-title \"Scid\" -message \"Out of memory\nScid should crash rather quickly\"");
@@ -106,7 +106,7 @@
   char * buf = Tcl_AttemptAlloc(size);
 #ifndef POCKET
   if (logMemory)
-    printf("Alloc %u %d\n", (unsigned int) buf, size );
+    printf("Alloc %lu %d\n", (unsigned long) buf, size );
 #endif
   return buf;
 }
@@ -115,7 +115,7 @@
   char * buf = Tcl_AttemptRealloc(ptr, size);
 #ifndef POCKET
   if (logMemory)
-    printf("Realloc %u -> %u %d\n", (unsigned int) ptr, (unsigned int) buf, 
size );
+    printf("Realloc %lu -> %lu %d\n", (unsigned long) ptr, (unsigned long) 
buf, size );
 #endif
   if (buf == NULL) {
     Tcl_Eval(currentTclInterp, "tk_messageBox -type ok -icon error -parent . 
-title \"Scid\" -message \"Out of memory\nScid could crash rather quickly\"");
@@ -126,7 +126,7 @@
 void my_Tcl_Free(char * ptr) {
 #ifndef POCKET
   if (logMemory)
-    printf("Free %u\n", (unsigned int) ptr );
+    printf("Free %lu\n", (unsigned long) ptr );
 #endif
 
   Tcl_Free(ptr);
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to