On Saturday 24 October 2009 17:28, Cristian Ionescu-Idbohrn wrote:
> > There should be a way to shut up gcc in these places only
> > instead of pessimizing the code. At least I hope so.
> 
> Maybe bb_error_msg_safe wrapper calling:
> 
>       bb_error_msg("%s", something);

We already have two:

extern void bb_simple_perror_msg(const char *s) FAST_FUNC;
extern void bb_simple_perror_msg_and_die(const char *s) NORETURN FAST_FUNC;

> > > and some other places where it might not:
> > >
> > >   bb_error_msg((char*)error_pkt_str);

Should be safe, but ok, it looks complex, feeding it through "%s".

> > >   bb_perror_msg(file);

Fixing.

> > >   bb_perror_msg_and_die(str);

Safe - grep for all three callers.

> > >   printf(pr->fmt);

Don't know, but it's done intentionally there.


--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to