[torquedev] small gcc compile error (gcc v 4.0.3)

Garrick Staples garrick at usc.edu
Mon Oct 29 12:46:53 MDT 2007

On Mon, Oct 29, 2007 at 05:03:26PM +1300, Chris LeBlanc alleged:
> Hello,
> I just wanted to mention that the svn trunk line of Torque give a
> compile error for the file src/cmds/qmgr.c when running under gcc
> 4.0.3 (Ubuntu 6.06, x86_64) using the stock configure options.  The
> error message is:
> > make
> gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include  -I../../src/include
> -ffast-math -O3  -DGNU_CC -DLINUX_OS -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -I/usr/local/Claritas/current/ -DBIT64 -W -Wall
> -Wno-unused-parameter -Wno-long-long -pedantic -Werror
> -D_LARGEFILE64_SOURCE -c qmgr.c
> cc1: warnings being treated as errors
> qmgr.c: In function 'execute':
> qmgr.c:1502: warning: passing argument 2 of 'pstderr1' makes pointer
> from integer without a cast
> make: *** [qmgr.o] Error 1
> It appears that on line 1502, its trying to pass an integer instead of
> a char string to the function pstderr1().  I've created a patch, using
> sprintf to make a copy of the integer in a string format.  The 'svn
> diff' is below, hopefully its useful.

I don't understand what's wrong with the original code.  The second arg is, in
fact, an integer.  It compiles without warning for me on various versions of
gcc include 3.4.6, 4.1.2, and 4.2.0.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20071029/53e4fde2/attachment.bin

More information about the torquedev mailing list