[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sprintf warning in libstdc++



At 03:10 PM 3/14/2005, Theo de Raadt wrote:
libc is now compiled to warn about such things.

Yes, there is a library like that included in OpenBSD, used by a few
rare applications here and there..


At the risk of being flamed...I noticed that postfix also reveals this warning as well...


<snip>
[src/scache]
gcc -DUSE_TLS -I/usr/include/openssl -DUSE_SASL_AUTH -I/usr/include -I/usr/local/include/sasl -DHAS_PCRE -I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -DSNAPSHOT -O2 -I. -I../../include -DOPENBSD3 -c scache.c
gcc -DUSE_TLS -I/usr/include/openssl -DUSE_SASL_AUTH -I/usr/include -I/usr/local/include/sasl -DHAS_PCRE -I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -DSNAPSHOT -O2 -I. -I../../include -DOPENBSD3 -o scache scache.o ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a -L/usr/local/lib -R/usr/local/lib -lsasl2 -L/usr/lib -R/usr/lib -lssl -lcrypto -L/usr/local/lib -lpcre -L/usr/local/BerkeleyDB.4.3/lib -R/usr/local/BerkeleyDB.4.3/lib -ldb
../../lib/libglobal.a(mail_conf_int.o)(.text+0x228): In function `set_mail_conf_int':
: warning: sprintf() is often misused, please use snprintf()


I had thought all along that this was a GCC/GNU issue and nothing more.
It compiles fine and runs fine, albeit these messages.






-- J.D. Bronson Aurora Health Care // Information Services // Milwaukee, WI USA Office: 414.978.8282 // Email: jd_(_at_)_aurora_(_dot_)_org // Pager: 414.314.8282



Visit your host, monkey.org