]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/splice.2: EXAMPLES: Use [[gnu::nonstring]]
authorAlejandro Colomar <alx@kernel.org>
Sat, 20 Sep 2025 19:38:52 +0000 (21:38 +0200)
committerAlejandro Colomar <alx@kernel.org>
Sat, 20 Sep 2025 19:43:41 +0000 (21:43 +0200)
This silences -Wunterminated-string-initialization.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/splice.2

index 4ce7c2846128a8239d25cf056c414b926ad825e7..a8f99301e5d2065a7e16b4afff8a532a28febf32 100644 (file)
@@ -281,7 +281,8 @@ main(void)
         int         fd;
         int         pfd[2];
         off_t       off;
-        const char  s[12] = "Hello, world";
+        [[gnu::nonstring]]
+       const char  s[12] = "Hello, world";
 \&
         fd = open("out", O_WRONLY | O_CREAT | O_EXCL, 0666);
         if (fd == \-1)