[torquedev] [PATCH] Torque 2.2.0 fails to build on amd64 with gcc-4.2

Adrian Knoth adi at drcomp.erfurt.thur.de
Fri Nov 2 07:53:54 MDT 2007


Hi!

Torque-2.2.0 (and probably other versions) fails to compile with gcc-4.2
on amd64:

FILE64_SOURCE -c parse.c  -fPIC -DPIC -o .libs/parse.o
cc1: warnings being treated as errors
parse.c: In function 'init_config':
parse.c:338: warning: cast from pointer to integer of different size
make[4]: *** [parse.lo] Error 1
make[4]: Leaving directory `/tmp/torque-2.2.0/src/scheduler.cc/samples/fifo'


The attached patch corrects this problem.


-- 
mail: adi at thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver

Q: Was passiert, wenn eine deutsche Blondine nach Österreich auswandert?
A: In beiden Ländern steigt der durchschnittliche IQ. (aus de.talk.jokes)
-------------- next part --------------
--- torque-2.2.0/src/scheduler.cc/samples/fifo/parse.c	2006-07-12 17:25:20.000000000 +0200
+++ torque-2.2.0-new/src/scheduler.cc/samples/fifo/parse.c	2007-11-01 11:33:15.000000000 +0100
@@ -335,7 +335,7 @@
     perror("Error Allocating Memory");
     return 0;
   }
-  memset( conf.non_prime_sort, (int) NULL, (num_sorts + 1 ) * 
+  memset( conf.non_prime_sort, 0, (num_sorts + 1 ) * 
   		sizeof( struct sort_info) );
   
   if( is_prime_time() == PRIME )


More information about the torquedev mailing list