HomeClusterLabs Projects

Low: various: address format-overflow warnings

Description

Low: various: address format-overflow warnings

When using -O3 to build pacemaker, gcc (14) will throw format-overflow
warnings for some possibly null '%s' directive arguments. We address the
current instances of such warnings by either removing meaningless log
entries or by moving them into proper contexts.

alerts.c:153:19: error: '%s' directive argument is null [-Werror=format-overflow=]
153 | crm_trace("Inserting alert key %s = '%s'", *key, value);

|                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

alerts.c:153:46: note: format string is defined here
153 | crm_trace("Inserting alert key %s = '%s'", *key, value);

|

Signed-off-by: Athos Ribeiro <athos.ribeiro@canonical.com>

Details

Provenance
Athos Ribeiro <athos.ribeiro@canonical.com>Authored on Thu, Jan 9, 9:40 AM
Parents
rPf715a7e7a42c: Merge pull request #3749 from kgaillot/release2
Branches
Unknown
Tags
Unknown

Event Timeline

Athos Ribeiro <athos.ribeiro@canonical.com> committed rPe4fc91fef4a0: Low: various: address format-overflow warnings (authored by Athos Ribeiro <athos.ribeiro@canonical.com>).Thu, Jan 9, 1:30 PM