src/mainAction.cpp:184:19: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if (pipeLeafs < 0) ~~~~~~~~~ ^ ~ src/mainAction.cpp:197:21: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if (outputLeafs < 0) ~~~~~~~~~~~ ^ ~ build log: http://package18.nyi.freebsd.org/data/headamd64PR216008-default/2017-01-29_16h09m05s/logs/errors/samesame-1.10.log regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Created attachment 179660 [details] The patch use a explicit cast (void *) and a more specific value -1
Comment on attachment 179660 [details] The patch use a explicit cast (void *) and a more specific value -1 > - if (pipeLeafs < 0) > + if (pipeLeafs == (void *)-1) popen(3) unlike pipe(2) returns NULL on failure, not (void *)-1. > - if (outputLeafs < 0) > + if (outputLeafs == (void *)-1) Ditto for fopen(3) unlike open(2).
Created attachment 180974 [details] Attached new patch file
A commit references this bug: Author: jbeich Date: Mon Mar 20 00:00:02 UTC 2017 New revision: 436516 URL: https://svnweb.freebsd.org/changeset/ports/436516 Log: sysutils/samesame: unbreak with clang 4.0 src/mainAction.cpp:184:19: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if (pipeLeafs < 0) ~~~~~~~~~ ^ ~ src/mainAction.cpp:197:21: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if (outputLeafs < 0) ~~~~~~~~~~~ ^ ~ PR: 216636 Submitted by: akruijff@dds.nl Approved by: portmgr blanket Changes: head/sysutils/samesame/Makefile head/sysutils/samesame/files/patch-src_mainAction.cpp