aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2017-01-25 22:02:49 -0800
committerAndrew Waterman <andrew@sifive.com>2017-01-25 22:02:49 -0800
commit6667bc4c42fd9968527644e32841757234285efd (patch)
treeab236c9f1d8f64f3c08e1aa9ad45163dd488b082
parentf6b2274af4a91763ecdb94600d7d54d5f7f262b5 (diff)
downloadriscv-pk-6667bc4c42fd9968527644e32841757234285efd.zip
riscv-pk-6667bc4c42fd9968527644e32841757234285efd.tar.gz
riscv-pk-6667bc4c42fd9968527644e32841757234285efd.tar.bz2
Placate gcc7 about buffer sizesarchive-1.9.1
-rw-r--r--machine/configstring.c4
1 files 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)