[LTP] [RFC PATCH 1/2] Add support for mixing C and shell code
Li Wang
liwang@redhat.com
Wed Jul 17 12:07:45 CEST 2024
On Wed, Jul 17, 2024 at 4:38 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> > tst_res_.c:52:9: error: format not a string literal and no format
> arguments
> > [-Werror=format-security]
> > 52 | tst_res_(argv[1], atoi(argv[2]), type, msg);
> > | ^~~~~~~~
>
> Right, this needs:
>
> tst_res_(argv[1], atoi(argv[2]), type, "%s", msg);
>
> I wonder why I didn't get warning at my end.
>
Probably because my GCC version is newer:
gcc version 14.1.1 20240607 (Red Hat 14.1.1-5) (GCC)
--
Regards,
Li Wang
More information about the ltp
mailing list