games/simutrans: Fix build with Clang 6

gui/simwin.cc:503:11: error: case value evaluates to -1, which cannot be narrowed to type 'uint32' (aka 'unsigned int') [-Wc++11-narrowing]
                                        case magic_none: return;
                                             ^

http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475044_s336572/logs/simutrans-120.2.2.log

- While here apply dos2unix and fix patch line endings
This commit is contained in:
Tobias Kortkamp 2018-07-28 08:12:06 +00:00
parent f5fd195104
commit f3f2d94e80
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=475510
4 changed files with 53 additions and 23 deletions

View file

@ -37,9 +37,12 @@ MAKE_ARGS= BACKEND=mixer_sdl \
FLAGS="-DUSE_C -DREVISION=${SIMUTRANS_REVISION}" \
VERBOSE=1
NO_WRKSUBDIR= yes
USES= gmake zip
USES= compiler dos2unix gmake zip
USE_SDL= sdl mixer
CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
CXXFLAGS_clang= -Wno-c++11-narrowing
DOS2UNIX_GLOB= *
DESKTOP_ENTRIES=Simutrans "" "" simutrans "Game;Simulation;" false
PLIST_FILES= bin/simutrans bin/simutrans-bin
PORTDATA= *

View file

@ -1,10 +1,10 @@
--- gui/loadsave_frame.h.orig 2017-02-17 12:53:58 UTC
+++ gui/loadsave_frame.h
@@ -11,6 +11,7 @@
#include "savegame_frame.h"
#include "../tpl/stringhashtable_tpl.h"
+#include <time.h>
#include <string>
class loadsave_t;
--- gui/loadsave_frame.h.orig 2017-02-17 12:53:58 UTC
+++ gui/loadsave_frame.h
@@ -11,6 +11,7 @@
#include "savegame_frame.h"
#include "../tpl/stringhashtable_tpl.h"
+#include <time.h>
#include <string>
class loadsave_t;

View file

@ -0,0 +1,27 @@
In file included from squirrel/sq_extensions.cc:6:
In file included from squirrel/../tpl/ptrhashtable_tpl.h:8:
In file included from squirrel/../tpl/hashtable_tpl.h:4:
In file included from squirrel/../tpl/slist_tpl.h:11:
In file included from /usr/include/c++/v1/iterator:417:
In file included from /usr/include/c++/v1/__functional_base:19:
/usr/include/c++/v1/utility:488:67: error: expected an identifier or template-id
after '::'
typename __make_tuple_indices<sizeof...(_Args1)>::type(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
squirrel/squirrel/sqobject.h:131:19: note: expanded from macro 'type'
#define type(obj) ((obj)._type)
^
--- squirrel/sq_extensions.cc.orig 2018-07-28 07:52:43 UTC
+++ squirrel/sq_extensions.cc
@@ -1,9 +1,9 @@
#include "sq_extensions.h"
+#include "../tpl/ptrhashtable_tpl.h"
#include "squirrel/sqpcheader.h" // for declarations...
#include "squirrel/sqvm.h" // for Raise_Error_vl
#include <stdarg.h>
-#include "../tpl/ptrhashtable_tpl.h"
// store data associate to vm's here
struct my_vm_info_t {

View file

@ -1,12 +1,12 @@
--- squirrel/squirrel/sqvm.cc.orig 2017-02-17 12:54:05 UTC
+++ squirrel/squirrel/sqvm.cc
@@ -1,8 +1,8 @@
/*
see copyright notice in squirrel.h
*/
-#include "sqpcheader.h"
#include <math.h>
+#include "sqpcheader.h"
#include <stdlib.h>
#include <limits.h>
#include "sqopcodes.h"
--- squirrel/squirrel/sqvm.cc.orig 2017-02-17 12:54:05 UTC
+++ squirrel/squirrel/sqvm.cc
@@ -1,8 +1,8 @@
/*
see copyright notice in squirrel.h
*/
-#include "sqpcheader.h"
#include <math.h>
+#include "sqpcheader.h"
#include <stdlib.h>
#include <limits.h>
#include "sqopcodes.h"