From: Rico Tzschichholz Date: Mon, 20 Mar 2023 15:19:36 +0000 (+0100) Subject: tests: Fix -Werror=array-bounds failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a0cb1546b1e86859a3fce00c27abfc62ba50d8e;p=thirdparty%2Fvala.git tests: Fix -Werror=array-bounds failure --- 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';