Following Simon's suggestion of replacing printf with Rprintf throughout
the source code R CMD check now complains less than before, but it still
complains...
I used the following two BASH lines to replace printf
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\printf\Rprintf\'
{} \;
find . -maxdepth 1 -type f -name '*.c' -exec sed -i
's\fRprintf\fprintf\' {} \;
and using grep I have confirmed that only fprintf and Rprintf remain in
the code.
the original warning (when printf was in the code) was
[QUOTE : ORIGINAL R CMD check WARNING]
R CMD check foobar_1.7.5.tar.gz
[LOTS OF '...OK' CHECK REPORTS REMOVED FOR BREVITY]
* checking compiled code ... NOTE
File '/home/david/foobar/package/foobar.Rcheck/foobar/libs/foobar.so':
Found 'putchar', possibly from 'putchar' (C)
Object: 'foobar.o'
Found 'puts', possibly from 'printf' (C), 'puts' (C)
Object: 'foobar.o'
Compiled code should not call functions which might terminate R nor write to
stdout/stderr instead of to the console.
[end QUOTE : ORIGINAL R CMD check WARNING]
now printf is no longer in the code the warning message is
[QUOTE : ORIGINAL R CMD check WARNING]
R CMD check foobar_1.7.6.tar.gz
[LOTS OF '...OK' CHECK REPORTS REMOVED FOR BREVITY]
* checking compiled code ... NOTE
File '/home/david/foobar/package/foobar.Rcheck/foobar/libs/foobar.so':
Found 'puts', possibly from 'printf' (C), 'puts' (C)
Object: 'foobar.o'
Compiled code should not call functions which might terminate R nor write to
stdout/stderr instead of to the console.
[end QUOTE : ORIGINAL R CMD check WARNING]
Which is better than before, but still not clean.
Both the following lines return 0 hits
grep printf *.c|grep -v Rprintf|grep -v fprintf
grep puts *.c
Is there some way to detect what has caused this warning about puts?
It's not a call to 'puts' or 'printf' because there are none.
many thanks
David
--
David Pleydell,
INRA,
UMR-1351 CMAEE,
Domaine Duclos,
Prise D'eau,
97122 Petit Bourg,
Guadeloupe
[email protected]
[email protected]
Tel +33 5 90 25 54 42
Fax +33 5 90 94 03 96
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel