[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sprintf warning in libstdc++
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: sprintf warning in libstdc++
- From: Hannah Schroeter <hannah_(_at_)_schlund_(_dot_)_de>
- Date: Mon, 14 Mar 2005 22:02:14 +0100
- Mail-followup-to: tech_(_at_)_openbsd_(_dot_)_org
- Organization: Schlund + Partner AG
Hello!
After an upgrade, I get warnings for sprintf in libstdc++. Things look
like this:
$ c++ \
-g -o test_internal \
main.o ../../../../lib/libmyc++/libmyc++.a \
/usr/lib/libstdc++.so.34.0: warning: sprintf() is often misused, please use snprintf()
After checking, it looks like something in libstdc++ really uses
sprintf:
$ nm /usr/lib/libstdc++.so.34.0 |grep sprintf
U sprintf
This is i386, current as of last week (Mar 9).
Looks like either
src/gnu/lib/libstdc++/libstdc++/config/locale/generic/c_locale.h
or
src/gnu/lib/libstdc++/libstdc++/config/locale/gnu/c_locale.h
is the culprit. There's snprintf based replacement code there, but this
is conditionalized with #ifdef _GLIBCPP_USE_C99, which seems to be off
for OpenBSD.
I've seen no change to that code since the last upgrade (just ran cvsync
and cvs -nq up -A to check).
Kind regards,
Hannah.
--
Hannah Schrvter Entwicklung hannah_(_at_)_schlund_(_dot_)_de
Bei Schlund + Partner AG Brauerstra_e 48 D-76135 Karlsruhe
This specification allows any of these approaches. Solving the
Halting Problem is considered extra credit. (RFC 3028)
Visit your host, monkey.org