diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-17 13:33:51 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-17 13:33:51 -0600 |
commit | 42fb27570262b52e2ca889030c621b5f4af76fe1 (patch) | |
tree | 1d70f96baa5089f8878a9c121ff0770846ad4090 /lib9p/tests/test_compile.c.gen | |
parent | 18ddce6270391e5c1924394f8b5d8079ad73289e (diff) | |
parent | 556f3ff6ccb9fa4b193d91216f85e8ade33b4383 (diff) |
Merge branch 'lukeshu/lint-ish'
Diffstat (limited to 'lib9p/tests/test_compile.c.gen')
-rwxr-xr-x | lib9p/tests/test_compile.c.gen | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib9p/tests/test_compile.c.gen b/lib9p/tests/test_compile.c.gen index c57ce9f..ef2aee6 100755 --- a/lib9p/tests/test_compile.c.gen +++ b/lib9p/tests/test_compile.c.gen @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # lib9p/tests/test_compile.c.gen - Generate code to make sure all generated macros work # # Copyright (C) 2025 Luke T. Shumaker <lukeshu@lukeshu.com> @@ -12,8 +12,8 @@ outfile=$2 echo echo "#include <lib9p/core.h>" echo 'int main(void) {' - 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 $'\t[[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\tx = &;\\n#endif/' + echo $'\treturn 0;' echo '}' } >"$outfile" |