Skip to content

Fix warnings - #755

Merged
sjaeckel merged 8 commits into
developfrom
fix-warnings
Jul 30, 2026
Merged

Fix warnings#755
sjaeckel merged 8 commits into
developfrom
fix-warnings

Conversation

@sjaeckel

@sjaeckel sjaeckel commented May 4, 2026

Copy link
Copy Markdown
Member

Pulled out from #751

@sjaeckel sjaeckel left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should modify our builds to catch the parts that we want to as well.

We already run ubsan in the meta builds, why aren't those things caught there?

Comment thread src/misc/pem/pem_ssh.c
Comment thread src/misc/pem/pem_read.c
@karel-m

karel-m commented May 5, 2026

Copy link
Copy Markdown
Member

Just FYI some options/flags I have used:

Sanitizers:

make clean
make -j$(nproc) CC=clang CFLAGS="-Wall -Wextra -I../libtommath -DUSE_LTM -DLTM_DESC -O1 -g3 -fno-omit-frame-pointer -fno-common -fsanitize=address,undefined -fsanitize-address-use-after-scope" LDFLAGS="-fsanitize=address,undefined" EXTRALIBS="-L../libtommath -ltommath" all
ASAN_OPTIONS=detect_leaks=1:abort_on_error=0:symbolize=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=0 ./test

Max compiler warnings:

make clean
make -j$(nproc) CC=clang CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-variable-declarations -Wshadow -Wformat=2 -Wno-format-nonliteral -Wunreachable-code -Wbad-function-cast -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wformat-security -Wreturn-type -Wincompatible-pointer-types -Wimplicit-function-declaration -Wint-conversion -Wfloat-conversion -Wstrict-overflow -Wvla -Walloca -Wnull-dereference -Wredundant-decls -Wnested-externs -Wdeclaration-after-statement -Wmissing-field-initializers -Wold-style-definition -I../libtommath -DUSE_LTM -DLTM_DESC -O2" EXTRALIBS="-L../libtommath -ltommath" all

@sjaeckel
sjaeckel merged commit f5fe918 into develop Jul 30, 2026
201 of 202 checks passed
@sjaeckel
sjaeckel deleted the fix-warnings branch July 30, 2026 13:38
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