Menu

#1 gcc 2.95.2 doesn't like %le, %lf in printf

open
nobody
None
5
2003-07-20
2003-07-20
Anonymous
No

this quiets gcc:

8<----------------------------------------------------------------------------
--- crm114.c Tue Jul 1 13:01:57 2003
+++ crm114-2003-07-01-alpha/crm114.c Sun Jul 20 23:57:24 2003
@@ -5363,14 +5363,14 @@
{
char buf[1024];
buf [0] = '\000';
- sprintf (buf, "Probabalistic match quality: %lf, pR: %lf \n",
+ sprintf (buf, "Probabalistic match quality: %f, pR: %f \n",
pic,
log10 (pic) - log10 (pnic) );
// note also that strcat _accumulates_ in stext.
// there is a possible buffer overflow except that _we_ control
// what gets written here. So it's no biggie.
strcat (stext, buf);
- sprintf (buf, "P(succ): %le, P(fail): %le \n", pic, pnic);
+ sprintf (buf, "P(succ): %e, P(fail): %e \n", pic, pnic);
strcat (stext, buf);
sprintf (buf, "S hits : %ld, F hits : %ld \n", ghits, ehits);
strcat (stext, buf);
8<---------------------------------------------------------------------------

--paolo
pp@ieee.org

Discussion


Log in to post a comment.