]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
irqtop: fix compiler warning [-Werror=format-truncation=]
authorKarel Zak <kzak@redhat.com>
Mon, 6 Jun 2022 14:14:30 +0000 (16:14 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Jul 2022 16:05:23 +0000 (18:05 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/irq-common.c

index 208327096e8c7d24d3c8ae1bb72724aaa89251bd..b4f7c9363855aed0af4bbf81d1f079401444264d 100644 (file)
@@ -427,8 +427,8 @@ struct libscols_table *get_scols_cpus_table(struct irq_output *out,
        struct libscols_table *table;
        struct libscols_column *cl;
        struct libscols_line *ln;
-       char colname[sizeof(stringify_value(LONG_MAX))];
-       size_t i;
+       char colname[sizeof("cpu") + sizeof(stringify_value(LONG_MAX))];
+       size_t i, j;
 
        if (prev) {
                for (i = 0; i < curr->nr_active_cpu; i++) {