Created attachment 211766 [details]
Use strcmp instead of custom macros
Fix clang 10.0.0 errors:
xkbcomp.c:228:37: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare]
if ((argv[i] != '-') || (uStringEqual(argv[i], "-")))
./utils.h:195:30: note: expanded from macro 'uStringEqual'
#define uStringEqual(s1,s2) (uStringCompare(s1,s2)==Equal)
./utils.h:198:38: note: expanded from macro 'uStringCompare'
Don't attempt to do this macro trickery, and simply use strcmp instead,
where it applies.
Could you open an MR upstream too ?
I don't mind having patches in the ports tree but I prefer having them when upstream is aware of the issue and at least ack. If they are slow we can always add them.
Hold this until the patch has landed upstream (since it's well on the way). Then you have approval to commit this.
I've asked upstream to roll this (and some other changes since the last xkbcomp release) into a new release as well, but there's no need to wait for that.
A commit references this bug:
Date: Thu Feb 20 20:30:10 UTC 2020
New revision: 526587
x11/xkbcomp: Update to 1.4.3
Update x11/xkbcomp to 1.4.3, this fixes the build with llvm 10.
PR: 244235 (based on)
Submitted by: dim
I took the liberty of updating the port to the new release, which includes your fix.
Thanks for the help in getting it submitted upstream!