From 6667bc4c42fd9968527644e32841757234285efd Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 25 Jan 2017 22:02:49 -0800 Subject: Placate gcc7 about buffer sizes --- machine/configstring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine/configstring.c b/machine/configstring.c index fb2fed7..4e72f04 100644 --- a/machine/configstring.c +++ b/machine/configstring.c @@ -36,7 +36,7 @@ static void query_plic(const char* config_string) static void query_hart_plic(const char* config_string, hls_t* hls, int core, int hart) { - char buf[32]; + char buf[48]; snprintf(buf, sizeof buf, "core{%d{%d{plic{m{ie", core, hart); query_result res = query_config_string(config_string, buf); if (res.start) @@ -62,7 +62,7 @@ static void query_harts(const char* config_string) { for (int core = 0, hart; ; core++) { for (hart = 0; ; hart++) { - char buf[32]; + char buf[40]; snprintf(buf, sizeof buf, "core{%d{%d{ipi", core, hart); query_result res = query_config_string(config_string, buf); if (!res.start) -- cgit v1.1