summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2023-03-20 16:19:36 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2023-03-20 16:21:35 +0100
commit6a0cb1546b1e86859a3fce00c27abfc62ba50d8e (patch)
tree96477a64af2b87674b87b9d25e032d90ce853e3a
parented68b9f412bd6932e384cc8c6ac89257ae40142f (diff)
downloadvala-6a0cb1546b1e86859a3fce00c27abfc62ba50d8e.tar.gz
tests: Fix -Werror=array-bounds failure
-rw-r--r--tests/control-flow/pre-post-increment-array-index.c-expected2
-rw-r--r--tests/control-flow/pre-post-increment-array-index.vala2
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';