sword compile errors
Jan Beich
jbeich at FreeBSD.org
Thu Sep 14 08:16:33 UTC 2017
bruce <bruce at hawaii-pacific.com> writes:
> Hi,
>
> updating sword with portmaster caused the following errors:
>
>
> ../src/keys/treekeyidx.cpp:64:12: error: ordered comparison between
> pointer and
> zero ('sword::FileDesc *' and 'int')
> if (datfd <= 0) {
> ~~~~~ ^ ~
> ../src/keys/treekeyidx.cpp:334:12: error: ordered comparison between
> pointer and
> zero ('sword::FileDesc *' and 'int')
> if (datfd > 0) {
> ~~~~~ ^ ~
> ../src/keys/treekeyidx.cpp:388:12: error: ordered comparison between
> pointer and
> zero ('sword::FileDesc *' and 'int')
> if (idxfd > 0) {
> ~~~~~ ^ ~
> ../src/keys/treekeyidx.cpp:425:12: error: ordered comparison between
> pointer and
> zero ('sword::FileDesc *' and 'int')
> if (idxfd > 0) {
> ~~~~~ ^ ~
> ../src/keys/treekeyidx.cpp:491:12: error: ordered comparison between
> pointer and
> zero ('sword::FileDesc *' and 'int')
> if (idxfd > 0) {
> ~~~~~ ^ ~
> 5 errors generated.
This is known issue[1] on FreeBSD 11.1 or later. Try converting "<= 0"
to "== NULL" and "> 0" to "!= NULL" assuming there're no other bugs in
those ordered comparisons. Ideally, the fix should be submitted upstream
against their development version first to avoid divergence and after
that backported to FreeBSD Ports while annotating the origin.
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216194
More information about the freebsd-ports
mailing list