maintainer-feedback requested: [Bug 244235] x11/xkbcomp: Fix build with clang 10.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Feb 19 19:42:58 UTC 2020


Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-x11 mailing list
<x11 at FreeBSD.org> for maintainer-feedback:
Bug 244235: x11/xkbcomp: Fix build with clang 10.0.0
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244235



--- Description ---
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.


More information about the freebsd-x11 mailing list