summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorChristoph Erhardt <erhardt@cs.fau.de>2017-09-01 14:06:46 +0200
committerAndreas Fried <andreas.fried@kit.edu>2017-09-01 16:03:34 +0200
commita2560f9debd6e7cdf16c2388d982dc90dcf76af6 (patch)
tree953dd184073f6831c71ce3b0da63f4cb881c734a /ir/ir
parent7cf172ce10f287a623597e73614ac85bb977adca (diff)
Fix snprintf() compiler warning
GCC complains that the destination buffer is too small because the resulting output string can take up to 17 characters.
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irverify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/ir/irverify.c b/ir/ir/irverify.c
index 3406616..caf0803 100644
--- a/ir/ir/irverify.c
+++ b/ir/ir/irverify.c
@@ -80,7 +80,7 @@ static bool check_input_mode(const ir_node *n, int input, const char *inputname,
ir_node *in = get_irn_n(n, input);
ir_mode *in_mode = get_irn_mode(in);
if (in_mode != mode) {
- char num[16];
+ char num[17];
if (inputname == NULL) {
snprintf(num, sizeof(num), "input %d", input);
inputname = num;
@@ -121,7 +121,7 @@ static bool check_mode_same_input(const ir_node *n, int input,
ir_node *in = get_irn_n(n, input);
ir_mode *in_mode = get_irn_mode(in);
if (mode != in_mode) {
- char num[16];
+ char num[17];
if (inputname == NULL) {
snprintf(num, sizeof(num), "input %d", input);
inputname = num;