Bug 244401 - print/libraqm: Fix build with clang 10.0.0
Summary: print/libraqm: Fix build with clang 10.0.0
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koop Mast
URL:
Keywords: buildisok
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-02-25 17:51 UTC by Dimitry Andric
Modified: 2020-03-11 00:27 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (kwm)


Attachments
Fix comparisons in libraqm (1.51 KB, patch)
2020-02-25 17:51 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2020-02-25 17:51:38 UTC
Created attachment 211932 [details]
Fix comparisons in libraqm

As reported in bug 244251, with clang 10.0.0 the print/libraqm port runs into several -Werror warnings:

raqm.c:1934:24: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
      if (ch != 0x102B || ch != 0x102C || ch != 0x1038 ||
          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1937:25: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          (ch <= 0x109A && ch >= 0x109C) || ch != 0x1A61 || ch != 0x1A63 ||
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1936:41: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          ch != 0x1083 || (ch <= 0x1087 && ch >= 0x108C) || ch != 0x108F ||
                           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1935:59: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          (ch <= 0x1062 && ch >= 0x1064) || (ch <= 0x1067 && ch >= 0x106D) ||
                                             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1935:25: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          (ch <= 0x1062 && ch >= 0x1064) || (ch <= 0x1067 && ch >= 0x106D) ||
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
5 errors generated.

The comparisons are clearly invalid as written, and this is most likely due to incorrect boolean inversion done on the negated expression.

This problem has been reported upstream too:
https://github.com/HOST-Oman/libraqm/issues/115

The attached patch is what I have also proposed upstream.
Comment 1 Automation User 2020-03-11 00:27:00 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/125121988