Module Name: src Committed By: skrll Date: Mon Aug 24 07:42:02 UTC 2020
Modified Files: src/sys/arch/arm/sunxi: sunxi_nand.c Log Message: Appease gcc when building with KASAN which gave this error before error: stack usage might be unbounded [-Werror=stack-usage=] To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/sunxi/sunxi_nand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/sunxi/sunxi_nand.c diff -u src/sys/arch/arm/sunxi/sunxi_nand.c:1.7 src/sys/arch/arm/sunxi/sunxi_nand.c:1.8 --- src/sys/arch/arm/sunxi/sunxi_nand.c:1.7 Sun Jul 5 05:16:50 2020 +++ src/sys/arch/arm/sunxi/sunxi_nand.c Mon Aug 24 07:42:02 2020 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ sunxi_nand_attach_chip(struct sunxi_nand 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));