mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-03 04:02:05 +00:00
policycoreutils: use string literal as format strings
Use string literal as format string so that compilers can validate the count and types of the inherent arguments. sestatus.c: In function ‘printf_tab’: sestatus.c:175:16: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] 175 | printf(buf, outp); | ^~~ Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
c42dcf58de
commit
fb68d036b8
@ -170,9 +170,7 @@ void load_checks(char *pc[], int *npc, char *fc[], int *nfc)
|
||||
|
||||
void printf_tab(const char *outp)
|
||||
{
|
||||
char buf[20];
|
||||
snprintf(buf, sizeof(buf), "%%-%us", COL);
|
||||
printf(buf, outp);
|
||||
printf("%-*s", COL, outp);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user