From b9cb58b797b721ee49bcfdaafbab6455e2a4f61e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 10 Jul 2024 20:00:26 -0500 Subject: [PATCH] Rephrase some code clang can't handle (spurious warnings about nothing). --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a4a2e152..397b727b 100644 --- a/main.c +++ b/main.c @@ -150,8 +150,9 @@ void check_help(char **arg) // Lie to autoconf when it asks stupid questions, so configure regexes // that look for "GNU sed version %f" greater than some old buggy number // don't fail us for not matching their narrow expectations. - sprintf(toybuf, (flags&TOYFLAG_AUTOCONF) ? " (is not GNU %s 9.0)" : "", - toys.which->name); + *toybuf = 0; + if (flags&TOYFLAG_AUTOCONF) + sprintf(toybuf, " (is not GNU %s 9.0)", toys.which->name); xprintf("toybox %s%s\n", toybox_version, toybuf); xexit(); } -- 2.39.2