[Ecls-list] problems in src/c/dpp.c - too many & too few arguments.

Dr. David Kirkby david.kirkby at onetel.net
Thu Sep 16 10:30:55 UTC 2010


I thought I'd reported this before, but can't see to find the email. So I'll 
have another go.

When I'm building ecl-10.2.1 as part of Sage I get too warning messages from gcc.

/export/home/drkirkby/sage-4.6.alpha0/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c: 
In function 'put_declaration':
/export/home/drkirkby/sage-4.6.alpha0/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c:678:5: 
warning: too few arguments for format
/export/home/drkirkby/sage-4.6.alpha0/spkg/build/ecl-10.2.1.p2/src/src/c/dpp.c:680:13: 
warning: too many arguments for format


Looking at line 678 of dpp.c, I see:

     fprintf(out, "\tif (ecl_unlikely(narg!=%d))");

So there's a %d, but what is associate with the %d? There should be an integer, 
but there is not one. So it seems to me gcc is right to complain there are too 
few arguments for format.

Likewise, on line 680, I see:

     fprintf(out, "\t   FEwrong_num_arguments(MAKE_FIXNUM(%d));\n",
             nreq, function_code);

There's one two arguments supplied, but only one %d is there. That does not make 
any sense to me. Both "nreq" and "function_code" are declared as integers, so 
should there not two %d's and not one?

Again, it seems gcc is right to complain that.

There are thousands of warning messages in Sage, but I'm a bit concerned about 
resolving those in ecl, as the ecl library being built has text relocation 
problems - see

http://trac.sagemath.org/sage_trac/ticket/9840

The ECL specific issue is now

http://trac.sagemath.org/sage_trac/ticket/9917

Dave





More information about the ecl-devel mailing list