From 6a0cb1546b1e86859a3fce00c27abfc62ba50d8e Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Mon, 20 Mar 2023 16:19:36 +0100 Subject: [PATCH] tests: Fix -Werror=array-bounds failure --- tests/control-flow/pre-post-increment-array-index.c-expected | 2 +- tests/control-flow/pre-post-increment-array-index.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/control-flow/pre-post-increment-array-index.c-expected b/tests/control-flow/pre-post-increment-array-index.c-expected index da5169eee..f10350740 100644 --- a/tests/control-flow/pre-post-increment-array-index.c-expected +++ b/tests/control-flow/pre-post-increment-array-index.c-expected @@ -18,7 +18,7 @@ _vala_main (void) gint _tmp0_; gint _tmp1_; gint _tmp2_; - foo[4] = '\0'; + foo[3] = '\0'; i = 0; _tmp0_ = i; i = _tmp0_ + 1; diff --git a/tests/control-flow/pre-post-increment-array-index.vala b/tests/control-flow/pre-post-increment-array-index.vala index c8a08feca..516028c3d 100644 --- a/tests/control-flow/pre-post-increment-array-index.vala +++ b/tests/control-flow/pre-post-increment-array-index.vala @@ -1,6 +1,6 @@ void main () { char foo[4]; - foo[4] = '\0'; + foo[3] = '\0'; var i = 0; foo[i++] = 'b'; -- 2.47.2