summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu.c
diff options
context:
space:
mode:
authorRuediger Meier2015-01-20 15:49:21 +0100
committerRuediger Meier2015-01-21 11:15:19 +0100
commitf205c90a72707591ad5342429d8e13fa69294ae2 (patch)
tree1509f3e51390ab2d9f4337507729da79e5f1dc00 /sys-utils/lscpu.c
parentbuild-sys: fix UL_SCANF_TYPE_MODIFIER for icc (diff)
downloadkernel-qcow2-util-linux-f205c90a72707591ad5342429d8e13fa69294ae2.tar.gz
kernel-qcow2-util-linux-f205c90a72707591ad5342429d8e13fa69294ae2.tar.xz
kernel-qcow2-util-linux-f205c90a72707591ad5342429d8e13fa69294ae2.zip
build: fix printf warnings for icc (-Wformat-security)
Intel compiler complains about printf style function calls with trivial format string and no other arguments. Like this one: ../sys-utils/ipcrm.c(117): warning #2279: printf/scanf format not a string literal and no format arguments err(EXIT_FAILURE, iskey ? _("key failed") : _("id failed"));
Diffstat (limited to 'sys-utils/lscpu.c')
-rw-r--r--sys-utils/lscpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 9b3adbcd5..82a7dbe05 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -1242,20 +1242,20 @@ get_cell_data(struct lscpu_desc *desc, int idx, int col,
if (!desc->configured)
break;
if (mod->mode == OUTPUT_PARSABLE)
- snprintf(buf, bufsz,
+ snprintf(buf, bufsz, "%s",
desc->configured[idx] ? _("Y") : _("N"));
else
- snprintf(buf, bufsz,
+ snprintf(buf, bufsz, "%s",
desc->configured[idx] ? _("yes") : _("no"));
break;
case COL_ONLINE:
if (!desc->online)
break;
if (mod->mode == OUTPUT_PARSABLE)
- snprintf(buf, bufsz,
+ snprintf(buf, bufsz, "%s",
is_cpu_online(desc, cpu) ? _("Y") : _("N"));
else
- snprintf(buf, bufsz,
+ snprintf(buf, bufsz, "%s",
is_cpu_online(desc, cpu) ? _("yes") : _("no"));
break;
case COL_MAXMHZ: