Unix Technical Forum

printf bug in softraid.c

This is a discussion on printf bug in softraid.c within the mailing.openbsd.tech forums, part of the OpenBSD category; --> Hi all, I found a wrong printf statement in softraid.c while trying to compile the kernel without -Wno-format. I ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-03-2008, 02:46 PM
rainer
 
Posts: n/a
Default printf bug in softraid.c

Hi all,

I found a wrong printf statement in softraid.c while trying to
compile the kernel without -Wno-format.
I understand, that printf(9) is totally different (%b, %z i.e.),
which is a little bit sad, since -Wno-format can mask bugs sometimes.
Probably "fixing" gcc or printf(9) would introduce more bugs, than
it would find, right?
At least I walked thru a lot of the bogus printfs now and they seem
to be fine.
Fix for the (first and) only really broken one is attached...
Thanks to martin@ for a great discussion.

Bye,
Rainer
Index: dev//softraid.c
================================================== =================
RCS file: /cvs/src/sys/dev/softraid.c,v
retrieving revision 1.104
diff -u -r1.104 softraid.c
--- dev//softraid.c 15 Feb 2008 05:29:25 -0000 1.104
+++ dev//softraid.c 2 Apr 2008 19:41:24 -0000
@@ -771,7 +771,7 @@
bzero(sd->sd_meta, SR_META_SIZE * 512);

if (sr_clear_metadata(sd)) {
- printf("%s: failed to clear metadata\n");
+ printf("%s: failed to clear metadata\n", DEVNAME(sc));
goto unwind;
}
}

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 12:46 AM.


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