writerperfect: parenthesize the REQUIRE_VERSION expansion

The macro expands to an unparenthesized a || (b && c), so a caller appending
&& binds it to the second operand only, leaving the first to decide alone.
Every current caller uses it standalone, where this changes nothing.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I304b5bbc5e4e921ee843cbfec07685a5686b55b4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8118
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a5a814883eff59db39fea75675958cdf49e0c3a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208844
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Mike Kaganski
2026-07-30 18:07:30 +02:00
committed by Xisco Fauli
parent f201337f3b
commit 104d56c090
+2 -2
View File
@@ -21,9 +21,9 @@
#include <test/bootstrapfixture.hxx>
#define REQUIRE_VERSION(major, minor, micro, req_major, req_minor, req_micro) \
(major) > (req_major) \
((major) > (req_major) \
|| ((major) == (req_major) \
&& ((minor) > (req_minor) || ((minor) == (req_minor) && ((micro) >= (req_micro)))))
&& ((minor) > (req_minor) || ((minor) == (req_minor) && ((micro) >= (req_micro))))))
#define REQUIRE_EBOOK_VERSION(major, minor, micro) \
REQUIRE_VERSION(EBOOK_VERSION_MAJOR, EBOOK_VERSION_MINOR, EBOOK_VERSION_MICRO, major, minor, \