Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/sunxi Appease gcc when building with KASAN whic...



details:   https://anonhg.NetBSD.org/src/rev/499343edf8b6
branches:  trunk
changeset: 937716:499343edf8b6
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Aug 24 07:42:02 2020 +0000

description:
Appease gcc when building with KASAN which gave this error before

error: stack usage might be unbounded [-Werror=stack-usage=]

diffstat:

 sys/arch/arm/sunxi/sunxi_nand.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d77d5b5f068f -r 499343edf8b6 sys/arch/arm/sunxi/sunxi_nand.c
--- a/sys/arch/arm/sunxi/sunxi_nand.c   Mon Aug 24 06:55:16 2020 +0000
+++ b/sys/arch/arm/sunxi/sunxi_nand.c   Mon Aug 24 07:42:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_nand.c,v 1.7 2020/07/05 05:16:50 skrll Exp $ */
+/* $NetBSD: sunxi_nand.c,v 1.8 2020/08/24 07:42:02 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_nand.c,v 1.7 2020/07/05 05:16:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_nand.c,v 1.8 2020/08/24 07:42:02 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -592,7 +592,7 @@
 
        mtdparts = get_bootconf_string(boot_args, "mtdparts");
        if (mtdparts != NULL) {
-               char mtd_id[strlen("sunxi-nand.X") + 1];
+               char mtd_id[] = "sunxi-nand.XX";
                snprintf(mtd_id, sizeof(mtd_id), "sunxi-nand.%u",
                    device_unit(sc->sc_dev));
 



Home | Main Index | Thread Index | Old Index