[Nauty-list] readgraph()
Brendan McKay
bdm at cs.anu.edu.au
Tue Feb 15 21:54:16 EST 2011
Hi, You can ignore the message
warning: format not a string literal and no format arguments
as it does indicate an actual problem.
The warning occurs in situations like this:
int f(char *s)
{
printf(s);
}
Some versions of the GCC compiler thinks it is suspicious, but it is
fine if the argument is an ordinary string, eg. f("hello world\n").
The next release of nauty will avoid the warning by changing the
printf statement to printf("%s",s).
Brendan.
* Susanne Nieß <niess at ma.tum.de> [110215 19:48]:
> Thank you very much, after moving the malloc() calls the code works. You are completely right, I accidently attached the wrong source code, sorry. The problem, however, occurred in both testnau4 and testnau3. On the unix machine where I testet them, both seemed to be in an endless loop until I killed them after 24 hours. I also tried it on a linux machine. The compiler made some warnings and the files it saved are different and both nonsense (no change between before and after moving the malloc) and I am still busy debugging that. When I installed the nauty package on linux, there were several warnings that I did not understand. Do they mean my system is somehow not compatible with nauty? I attach the file nautywarn2.txt with those warnings.
>
>
>
> On 02/12/11 02:57 AM, William Rummler wrote:
>> I could not reproduce the long running time you mentioned with the
>> latest source and input, but I have a feeling that it might have
>> something to do with a scanf() that was waiting for input. (On the
>> other hand, that is a total guess and might be completely wrong.)
>>
>> I did not notice any statements for printing the "testX" output in
>> this source file (testnau3.c). Is this the right file (or similar
>> enough to the right one)? If I recall correctly, your testnau4.c had
>> some print statements for "testX" output.
>>
>> I quickly went over this one and found only one major issue, which was
>> that the variable l is not initialized before its use in the malloc()
>> calls for lab, ptn, and orbits. Those malloc() calls should probably
>> be moved to just after the sequence of fscanf() calls for anz, h, and
>> l.
>>
>>
>> Since you mention that you traced the problem to the nauty() call, I
>> think I should ask if you sent the right file(s)?
>>
>> - William
>
> make
> gcc -c -O4 naututil.c
> gcc -c -O4 nauty.c
> gcc -c -O4 nautil.c
> gcc -c -O4 nautinv.c
> gcc -c -O4 naugraph.c
> gcc -c -O4 rng.c
> gcc -o dreadnaut -O4 dreadnaut.c \
> naututil.o nauty.o nautil.o nautinv.o naugraph.o rng.o
> gcc -c -O4 gtools.c
> gtools.c: In function ???gt_abort???:
> gtools.c:1831: warning: format not a string literal and no format arguments
> gcc -o copyg -O4 copyg.c gtools.o
> gcc -o listg -O4 listg.c gtools.o nautil.o
> listg.c: In function ???putedges???:
> listg.c:170: warning: format not a string literal and no format arguments
> listg.c:173: warning: format not a string literal and no format arguments
> gcc -c -O4 gtnauty.c
> gcc -c -O4 nausparse.c
> gcc -c -O4 gutil2.c
> gcc -o labelg -O4 labelg.c gtools.o gtnauty.o \
> nauty.o nautil.o naugraph.o nautinv.o nausparse.o \
> gutil2.o
> gcc -o dretog -O4 dretog.c \
> gtools.o naututil.o nautil.o rng.o naugraph.o
> gcc -o amtog -O4 amtog.c gtools.o
> gcc -c -O4 -DMAXN=WORDSIZE -o nauty1.o nauty.c
> gcc -c -O4 -DMAXN=WORDSIZE -o nautil1.o nautil.c
> gcc -c -O4 -DMAXN=WORDSIZE -o naugraph1.o naugraph.c
> gcc -o geng -O4 -DMAXN=32 geng.c gtools.o nauty1.o \
> nautil1.o naugraph1.o
> gcc -o complg -O4 complg.c gtools.o gtnauty.o \
> nauty.o nautil.o naugraph.o nausparse.o
> gcc -o shortg -O4 shortg.c gtools.o gtnauty.o nautinv.o \
> nauty.o nautil.o naugraph.o nausparse.o gutil2.o
> gcc -o showg -O4 showg.c
> showg.c: In function ???gt_abort???:
> showg.c:199: warning: format not a string literal and no format arguments
> showg.c: In function ???putedges???:
> showg.c:910: warning: format not a string literal and no format arguments
> showg.c:913: warning: format not a string literal and no format arguments
> gcc -o NRswitchg -O4 NRswitchg.c gtools.o gtnauty.o \
> nauty.o nautil.o naugraph.o nausparse.o
> gcc -c -O4 gutil1.c
> gcc -o biplabg -O4 biplabg.c \
> gtools.o nautil.o naugraph.o gutil1.o
> gcc -o addedgeg -O4 addedgeg.c gtools.o gtnauty.o \
> nauty.o nautil.o naugraph.o gutil1.o nausparse.o
> gcc -o deledgeg -O4 deledgeg.c gtools.o gtnauty.o \
> nauty.o nautil.o naugraph.o nausparse.o
> gcc -o countg -O4 testg.c gtools.o gtnauty.o gutil1.o \
> gutil2.o nauty.o nautil.o naugraph.o nausparse.o
> testg.c: In function ???printthesevals???:
> testg.c:345: warning: format not a string literal and no format arguments
> testg.c: In function ???printkeyvals???:
> testg.c:372: warning: format not a string literal and no format arguments
> gcc -o pickg -O4 testg.c gtools.o gtnauty.o gutil1.o \
> gutil2.o nauty.o nautil.o naugraph.o nausparse.o
> testg.c: In function ???printthesevals???:
> testg.c:345: warning: format not a string literal and no format arguments
> testg.c: In function ???printkeyvals???:
> testg.c:372: warning: format not a string literal and no format arguments
> gcc -o genrang -O4 genrang.c nausparse.o \
> gtools.o nautil.o naututil.o naugraph.o rng.o
> gcc -o newedgeg -O4 newedgeg.c gtools.o gtnauty.o \
> nauty.o nautil.o naugraph.o nausparse.o
> gcc -o catg -O4 catg.c gtools.o
> gcc -c -O4 -DMAXN=WORDSIZE -DWORDSIZE=32 -o gtoolsW1.o gtools.c
> gtools.c: In function ???gt_abort???:
> gtools.c:1831: warning: format not a string literal and no format arguments
> gcc -c -O4 -DMAXN=WORDSIZE -DWORDSIZE=32 -o nautyW1.o nauty.c
> gcc -c -O4 -DMAXN=WORDSIZE -DWORDSIZE=32 -o nautilW1.o nautil.c
> gcc -c -O4 -DMAXN=WORDSIZE -DWORDSIZE=32 -o naugraphW1.o naugraph.c
> gcc -o genbg -O4 -DMAXN=WORDSIZE -DWORDSIZE=32 genbg.c gtoolsW1.o \
> nautyW1.o nautilW1.o naugraphW1.o
> gcc -c -O4 naugroup.c
> gcc -o directg -O4 directg.c gtools.o \
> nauty.o nautil.o naugraph.o naugroup.o
> gcc -o multig -O4 multig.c gtools.o \
> nauty.o nautil.o naugraph.o naugroup.o
> gcc -o planarg -O4 \
> planarg.c planarity.c gtools.o
> gcc -o gentourng -O4 -DMAXN=24 gentourng.c gtools.o nauty1.o \
> nautil1.o naugraph1.o
> _______________________________________________
> Nauty-list mailing list
> Nauty-list at cs.anu.edu.au
> http://dcsmail.anu.edu.au/cgi-bin/mailman/listinfo/nauty-list
More information about the Nauty
mailing list