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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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; } } |