[LTP] [PATCH v2 4/5] API/cgroup: Make tst_cgroup_group_mk sprintf like

Cyril Hrubis chrubis@suse.cz
Fri Feb 4 11:01:56 CET 2022


Hi!
> Seems this is too strict for some compiling.  e.g.
> 
> cfs_bandwidth01.c: In function ???mk_cpu_cgroup???:
> cfs_bandwidth01.c:64:9: error: format not a string literal and no format
> arguments [-Werror=format-security]
>    64 |         *cg = tst_cgroup_group_mk(cg_parent, cg_child_name);
>       |         ^
> cc1: some warnings being treated as errors
> make: *** [../../../../include/mk/rules.mk:37: cfs_bandwidth01] Error 1
> 
> gcc version 11.2.1 20211203 (Red Hat 11.2.1-7) (GCC)

Ah, right, that's the __attribute__ format printf. I guess that we would
have to live with changing all the calls to
tst_cgroup_group_mk(foo, "%s", child_name)

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list