]> git.ipfire.org Git - thirdparty/tor.git/commit
build: fix -Wstrict-prototypes (Clang 16)
authorSam James <sam@gentoo.org>
Tue, 8 Nov 2022 06:42:59 +0000 (06:42 +0000)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 9 Nov 2022 16:46:55 +0000 (11:46 -0500)
commitee38514cc4372bfb7d01ee96a1110d600a30e061
tree1d0d9787424ce2a5bdb60d1fc2037094b46e6719
parent7a851e8983d74959475f67543a6a89137c430a58
build: fix -Wstrict-prototypes (Clang 16)

Clang 16 warns on -Wstrict-prototypes in preparation for C23 which can
among other things, lead to some configure tests silently failing/returning the wrong result.

Fixes this error:
```
-ignoreme: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
+ignoreme: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 main ()
```

For more information, see LWN.net [0] or LLVM's Discourse [1], gentoo-dev@ [2],
or the (new) c-std-porting mailing list [3].

[0] https://lwn.net/Articles/913505/
[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
[2] https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
[3] hosted at lists.linux.dev.

Bug: https://bugs.gentoo.org/879747
Signed-off-by: Sam James <sam@gentoo.org>
---
configure.ac