summaryrefslogtreecommitdiff
path: root/lib9p/tests
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-22 15:06:50 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-06 11:50:46 -0600
commit39d8fd2161d0a505c5b25add023aad833714b980 (patch)
tree4df71809eb36dc83243baf6fbbc2fdcc799c8051 /lib9p/tests
parenta9c86c0670f7ed763dedc9cc59dd288d5cc1011b (diff)
Use C23
This gives us: - [[maybe_unused]] instead of [[gnu::unused]] - bool/true/false are predefined, so no need for <stdbool.h>
Diffstat (limited to 'lib9p/tests')
-rw-r--r--lib9p/tests/test_compile.c2
-rwxr-xr-xlib9p/tests/test_compile.c.gen2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib9p/tests/test_compile.c b/lib9p/tests/test_compile.c
index e53b738..e814bf9 100644
--- a/lib9p/tests/test_compile.c
+++ b/lib9p/tests/test_compile.c
@@ -2,7 +2,7 @@
#include <lib9p/core.h>
int main(void) {
- [[gnu::unused]] uint64_t x;
+ [[maybe_unused]] uint64_t x;
#ifdef LIB9P_B4_FALSE
x = LIB9P_B4_FALSE;
#endif
diff --git a/lib9p/tests/test_compile.c.gen b/lib9p/tests/test_compile.c.gen
index eb89c54..c57ce9f 100755
--- a/lib9p/tests/test_compile.c.gen
+++ b/lib9p/tests/test_compile.c.gen
@@ -12,7 +12,7 @@ outfile=$2
echo
echo "#include <lib9p/core.h>"
echo 'int main(void) {'
- echo ' [[gnu::unused]] uint64_t x;'
+ echo ' [[maybe_unused]] uint64_t x;'
<"$generated_h" sed -nE 's/^\s*#\s*define\s*(\S[^ (]*)\s.*/\1/p' | LC_COLLATE=C sort -u | sed 's/.*/#ifdef &\n x = &;\n#endif/'
echo ' return 0;'
echo '}'