Bug 216630 - games/bloboats: fails to build with clang 4.0
Summary: games/bloboats: fails to build with clang 4.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-30 23:15 UTC by Jan Beich
Modified: 2017-02-03 12:41 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2017-01-30 23:15:07 UTC
src/menu.cpp:1570:11: error: ordered comparison between pointer and zero ('SDL_Rect **' and 'int')
        if(modes > 0) {
           ~~~~~ ^ ~

build log: http://package18.nyi.freebsd.org/data/headamd64PR216008-default/2017-01-29_16h09m05s/logs/errors/bloboats-1.0.2_6.log
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Jan Beich freebsd_committer 2017-02-02 09:54:16 UTC
Note, the error isn't new. GCC (even 4.2) can show it as well.

$ pkg install gcc5
$ make clean all CC='gcc5 -Werror=extra' CXX='g++5 -Werror=extra' CPP=cpp5 CHOSEN_COMPILER_TYPE=gcc BATCH=
[...]
src/menu.cpp: In member function 'void menu::resolution()':
src/menu.cpp:1570:13: error: ordered comparison of pointer with integer zero [-Werror=extra]
  if(modes > 0) {
             ^
Comment 2 commit-hook freebsd_committer 2017-02-03 12:36:36 UTC
A commit references this bug:

Author: ehaupt
Date: Fri Feb  3 12:35:52 UTC 2017
New revision: 433222
URL: https://svnweb.freebsd.org/changeset/ports/433222

Log:
  Fix build with clang 4.0

  PR:		216630 (based on)
  Notified by:	jbeich

Changes:
  head/games/bloboats/Makefile
  head/games/bloboats/files/patch-Makefile
  head/games/bloboats/files/patch-src_menu.cpp