The string format is not being passed triggering:
lscpu.c: In function ‘read_hypervisor’:
lscpu.c:545:4: warning: format not a string literal and no format arguments
lscpu.c: In function ‘get_cell_header’:
lscpu.c:904:2: warning: format not a string literal and no format arguments
lscpu.c:904:2: warning: format not a string literal and no format arguments
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
str = strchr(buf, ':');
if (!str)
continue;
- if (asprintf(&str, str + 1) == -1)
+ if (asprintf(&str, "%s", str + 1) == -1)
errx(EXIT_FAILURE, _("failed to allocate memory"));
/* remove leading, trailing and repeating whitespace */
while (*str == ' ')
if (desc->ncaches)
return buf;
}
- snprintf(buf, bufsz, coldescs[col].name);
+ snprintf(buf, bufsz, "%s", coldescs[col].name);
return buf;
}