Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2020 19:42:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 244235] x11/xkbcomp: Fix build with clang 10.0.0
Message-ID:  <bug-244235-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244235

            Bug ID: 244235
           Summary: x11/xkbcomp: Fix build with clang 10.0.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: x11@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: x11@FreeBSD.org
             Flags: maintainer-feedback?(x11@FreeBSD.org)

Created attachment 211766
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D211766&action=
=3Dedit
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] !=3D '-') || (uStringEqual(argv[i], "-")))
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
./utils.h:195:30: note: expanded from macro 'uStringEqual'
#define uStringEqual(s1,s2)     (uStringCompare(s1,s2)=3D=3DEqual)
                                 ^~~~~~~~~~~~~~~~~~~~~
./utils.h:198:38: note: expanded from macro 'uStringCompare'
                                 (s1)!=3D(s2):strcmp(s1,s2))
                                     ^ ~~~~

Don't attempt to do this macro trickery, and simply use strcmp instead,
where it applies.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244235-7788>