Build: fix compilation -Werror compilation issue with GCC 10 with s390x
Curiously, this possible NULL propagation:
In file included from ../../include/crm_internal.h:21,
from utils.c:10:In function ‘pe_action_set_reason’,
inlined from ‘custom_action’ at utils.c:605:13:../../include/crm/common/logging.h:235:13: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
235 | qb_log_from_external_source(func, FILE, fmt, level, \| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~236 | LINE, converted_tag , ##args); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./../include/crm/pengine/internal.h:19:43: note: in expansion of macro ‘crm_log_tag’
19 | # define pe_rsc_trace(rsc, fmt, args...) crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args) | ^~~~~~~~~~~utils.c:2502:9: note: in expansion of macro ‘pe_rsc_trace’
2502 | pe_rsc_trace(action->rsc, "Changing %s reason from '%s' to '%s'", action->uuid, action->reason, reason);| ^~~~~~~~~~~~tils.c: In function ‘custom_action’:
tils.c:2502:69: note: format string is defined here
2502 | pe_rsc_trace(action->rsc, "Changing %s reason from '%s' to '%s'", action->uuid, action->reason, reason);| ^~
was not observed with other architectures with a Rawhide rebuild.
There are various hypotheses behind that, currently concentrated
around a suspicion that "-fPIC" vs. building lacking that, which
is what libtool performs sequentially both unless the project is
configured with --disable-static (current stopgap solution for
said Rawhide/s390x problem) will mean that under some additional
circumstances, more interprocedural (or even cross-file?) data
flow analysis can be made and hence more problematic situations
discovered. To add insult into injury, libtool would purposefully
(and perhaps mistakenly) hide any outputs of possibly failing
second compilation pass per above when the former succeeded.
[Due to resorting to said --disable-static, further occurrences
of "new" problems are not being pursued at this time.]
Special thanks to Dan Horák for providing an instant feedback
based on some Fedora automatic notification triggers:
https://bugzilla.redhat.com/show_bug.cgi?id=1799842#c11
Also of interest, reduce double message to single one only
in one particular combination.