BUG/MINOR: diag: always show the version before dumping a diag warning
authorWilly Tarreau <w@1wt.eu>
Sat, 3 Feb 2024 11:01:58 +0000 (12:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Feb 2024 10:42:04 +0000 (11:42 +0100)
commitbebef90c808db015dc90d6cd0a013c936d59c21c
tree7e01f523276809ae1ddf0f14a95a92d236afd6d4
parent4e071ad92aac570d555fee43072a59a56eb27250
BUG/MINOR: diag: always show the version before dumping a diag warning

Diag warnings were added in 2.4 by commit 7b01a8dbd ("MINOR: global:
define diagnostic mode of execution") but probably due to the split
function that checks for the mode, they did not reuse the emission of
the version string before the first warning, as was brought in 2.2 by
commit bebd21206 ("MINOR: init: report in "haproxy -c" whether there
were warnings or not"). The effet is that diag warnings are emitted
before the version string if there is no other warning nor error. Let's
just proceed like for the two other ones.

This can be backported to 2.4, though this is of very low importance.

(cherry picked from commit ced41484018835bacab2bd74506edc8aac05b1ce)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/errors.c