Enable additional compiler warning flags #100
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
As part of the compiler flags hardening work (PR #98), a batch of low-impact flags was added
Already enabled:
-Wundef,-Wfloat-equal,-Wredundant-decls,-Walloc-zero,-Warray-bounds=2The flags below were evaluated but deferred due to the volume of changes required or false positives.
Deferred flags
-Wold-style-definitionvoid f()→void f(void))-Wshadowstanza.c— locals shadow outer variables (child,text)-Wjump-misses-initgotojumps over initialized variables inomemo.c-Wmissing-prototypesxmpp/notstaticand without header prototypes (blocking.c,presence.c,iq.c,connection.c,message.c)staticor add to.h-Wformat-truncation=2cmd_funcs.c:170-175— truncation already handled at runtime-Wall) works fine-Wswitch-enumdefault:already handle these; impractical-Wwrite-stringsconst char[]causes cascading errors across many function signatures-WconversionPlan
-Wold-style-definition,-Wshadow-Wjump-misses-init,-Wmissing-prototypes,-Wformat-truncation=2xmpp/internals, finishomemo.c, one pragma-Wwrite-strings,-Wconversion-Wswitch-enumEach flag should be added as a separate commit together with the fixes for affected code.
Enable additional compiler warning flags: `-Wshadow`, `-Wwrite-strings`, `-Wjump-misses-init` and othersto Enable additional compiler warning flags