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][0] != '-') || (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' (s1)!=(s2):strcmp(s1,s2)) ^ ~~~~ Don't attempt to do this macro trickery, and simply use strcmp instead, where it applies.
Hi Dim, Could you open an MR upstream too ? https://gitlab.freedesktop.org/xorg/app/xkbcomp/ 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. Thanks.
Submitted https://gitlab.freedesktop.org/xorg/app/xkbcomp/merge_requests/5
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: Author: zeising Date: Thu Feb 20 20:30:10 UTC 2020 New revision: 526587 URL: https://svnweb.freebsd.org/changeset/ports/526587 Log: x11/xkbcomp: Update to 1.4.3 Update x11/xkbcomp to 1.4.3, this fixes the build with llvm 10. Changelog: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244235 PR: 244235 (based on) Submitted by: dim Changes: head/x11/xkbcomp/Makefile head/x11/xkbcomp/distinfo
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!