diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-03-20 16:19:36 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-03-20 16:21:35 +0100 |
commit | 6a0cb1546b1e86859a3fce00c27abfc62ba50d8e (patch) | |
tree | 96477a64af2b87674b87b9d25e032d90ce853e3a | |
parent | ed68b9f412bd6932e384cc8c6ac89257ae40142f (diff) | |
download | vala-6a0cb1546b1e86859a3fce00c27abfc62ba50d8e.tar.gz |
tests: Fix -Werror=array-bounds failure
-rw-r--r-- | tests/control-flow/pre-post-increment-array-index.c-expected | 2 | ||||
-rw-r--r-- | 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'; |