]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
regtest: fix warning
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 3 Jan 2026 21:32:56 +0000 (22:32 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 3 Jan 2026 21:32:56 +0000 (22:32 +0100)
Added a nice const named variable then didn't use it

none/tests/bug514094.c

index 848db1d82ea71004a2382f1c66aa1d1ae0e08fac..5010272cbf31387f94ed62bb69cd68baab56b2c3 100644 (file)
@@ -26,8 +26,8 @@ int main(int argc, char** argv)
    assert(strcmp(resolved, buf) == 0);
 
    const size_t small_buf_size = 11;
-   char small_buf[11];
-   memset(small_buf, '#', 11);
+   char small_buf[small_buf_size];
+   memset(small_buf, '#', small_buf_size);
 #if defined(VGO_solaris)
    ret = readlink("/proc/self/path/a.out", small_buf, 10);
 #else