Skip to content

CMake: Fix compiler warnings in 'check_c_source_compiles' command - #216

Merged
twogood merged 1 commit into
twogood:mainfrom
kratz00:cmake_fix
Feb 19, 2026
Merged

twogood merged 1 commit into
twogood:mainfrom
kratz00:cmake_fix

Conversation

@kratz00

@kratz00 kratz00 commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

While experimenting with various compiler flags, CMake was failing at some point with: You must be using a really weird platform!

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
@kratz00
kratz00 marked this pull request as ready for review February 18, 2026 18:39
@twogood

twogood commented Feb 18, 2026

Copy link
Copy Markdown
Owner

What is the context here? Is this is preparation for another PR?

@kratz00

kratz00 commented Feb 18, 2026

Copy link
Copy Markdown
Contributor Author

You can merge it, CMake fails to generate the project if the "wrong" CFLAGS are set - it sets an error for check_c_source_compiles and bails at https://github.com/twogood/unshield/blob/main/CMakeLists.txt#L43

cmake.c: In function ‘main’:
cmake.c:3:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
    3 | int main(int argc, char **argv) {
      |          ~~~~^~~~
cmake.c:3:27: warning: unused parameter ‘argv’ [-Wunused-parameter]
    3 | int main(int argc, char **argv) {
      |                    ~~~~~~~^~~~

@twogood
twogood merged commit 37906ab into twogood:main Feb 19, 2026
6 checks passed
@kratz00
kratz00 deleted the cmake_fix branch February 19, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants