Unix Technical Forum

sprintf warning in libstdc++

This is a discussion on sprintf warning in libstdc++ within the lucky.openbsd.tech forums, part of the OpenBSD category; --> Hello! After an upgrade, I get warnings for sprintf in libstdc++. Things look like this: $ c++ \ -g ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2008, 12:19 PM
Hannah Schroeter
 
Posts: n/a
Default sprintf warning in libstdc++

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@schlund.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)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:53 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com