gcc complains with "‘sprintf’ output between 2 and 12 bytes" but
the buffer is only 10 bytes long. Update the buffer size to hold
the complete range of [-2147483648, 2147483646].
Signed-off-by: Daniel Wagner <redacted>
---
src/sched_deadline/cyclicdeadline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index ffefa9e6fecb..8447424273ee 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -1092,7 +1092,7 @@ int main(int argc, char **argv)
/* Default cpu to use is the last one */
if (!all_cpus && !setcpu) {
- setcpu_buf = malloc(10);
+ setcpu_buf = malloc(12);
if (!setcpu_buf)
fatal("malloc");
sprintf(setcpu_buf, "%d", cpu_count - 1);--
2.32.0