[torqueusers] Torque 2.3.0 compile problem on SLES 10 (IBM p690 POWER4+ architecture)

Peter van Heusden pvh at sanbi.ac.za
Wed Apr 9 08:29:41 MDT 2008


Compile with gcc 4.1.0 fails because of the warning 'comparison is
always true due to limited range of data type'. The following patch
fixes it:

--- src/cmds/qrerun.c.old       2008-04-09 16:26:58.000000000 +0200
+++ src/cmds/qrerun.c   2008-04-09 16:27:19.000000000 +0200
@@ -114,6 +114,7 @@
   int  errflg = 0;

   char c;
+  int c_int;

   static char usage[] = "usage: qrerun [-f] <JOBID>[ <JOBID>]...\n";

@@ -128,8 +129,9 @@

   extend[0] = '\0';

-  while ((c = getopt(argc,argv,GETOPT_ARGS)) != EOF)
+  while ((c_int = getopt(argc,argv,GETOPT_ARGS)) != EOF)
     {
+    c = (char) c_int;
     switch (c)
       {
       case 'm':


More information about the torqueusers mailing list