games/warmux: Fix build with Clang 6
interface/weapon_menu.cpp:394:12: error: cannot initialize return object of type 'Weapon *' with an rvalue of type 'bool' return false; ^~~~~ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475478_s336801/logs/errors/warmux-11.04.1_9.log map/tile.cpp:676:30: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] SynchTileInfo info = { i, t->GetSynchsum() }; ^
This commit is contained in:
parent
1ea6d09b08
commit
4f6bece540
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=475879
@ -19,10 +19,13 @@ LIB_DEPENDS= libxml++-2.6.so:textproc/libxml++26 \
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= cxx_present=yes
|
||||
USES= dos2unix gmake pkgconfig tar:bzip2
|
||||
USES= compiler dos2unix gmake pkgconfig tar:bzip2
|
||||
USE_SDL= sdl image mixer ttf gfx net
|
||||
DOS2UNIX_GLOB= fixed_class.h
|
||||
|
||||
# build ignores CXXFLAGS
|
||||
CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
|
||||
CFLAGS_clang= -Wno-c++11-narrowing
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}
|
||||
|
||||
OPTIONS_DEFINE= FRIBIDI SERVER NLS DEBUG
|
||||
|
15
games/warmux/files/patch-src_interface_weapon__menu.cpp
Normal file
15
games/warmux/files/patch-src_interface_weapon__menu.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
interface/weapon_menu.cpp:394:12: error: cannot initialize return object of type 'Weapon *' with an rvalue of type 'bool'
|
||||
return false;
|
||||
^~~~~
|
||||
|
||||
--- src/interface/weapon_menu.cpp.orig 2018-07-30 10:50:34 UTC
|
||||
+++ src/interface/weapon_menu.cpp
|
||||
@@ -391,7 +391,7 @@ void WeaponsMenu::Draw()
|
||||
Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly)
|
||||
{
|
||||
if (!show)
|
||||
- return false;
|
||||
+ return NULL;
|
||||
const std::vector<PolygonItem *>& items = poly->GetItem();
|
||||
WeaponMenuItem * tmp;
|
||||
Interface::GetInstance()->SetCurrentOverflyWeapon(NULL);
|
Loading…
Reference in New Issue
Block a user