On 2018 Apr 20 (Fri) at 02:55:16 +0200 (+0200), Ingo Schwarze wrote:
:Hi,
:
:Christian Weisgerber wrote on Wed, Apr 18, 2018 at 01:18:22PM +0200:
:> Peter Hessler:
:
:>> This patch set removes the "register" keyword, which is no longer
:>> legal to use.
:
:> Why bother?  It doesn't cause errors, just warnings.
:> Instead of patches, I would suggest defining it away by adding
:> -Dregister= to CXXFLAGS.
:
:My impression is that -Wno-deprecated-register might be even safer
:because it doesn't blindly change the code but just hide the
:warnings.
:
:The following patch fixes the problems that must be fixed to build
:with clang6.  They are all related to the well-known clang6 effect
:that NULL cannot be assigned to certain pointer types, in this
:case function pointers.
:
:The flag -Wno-c++11-narrowing is *really* required.  There are
:many dozen, maybe hundreds of violations scattered all over the
:place.  I suspect that some of them may actually be overflow bugs
:and result in rendering errors (or worse), but auditing for that
:is really a task for upstream, not for us (unless the MAINTAINER
:is extremely bored :).
:
:No, i'm not gonna get addicted to this game.  Testing it feels like
:brutal work.  It runs for me, and so do i.  But we want to get the
:tree back in shape, right?
:
:OK?
:  Ingo
:

It builds, it runs.

OK


:
:Index: Makefile
:===================================================================
:RCS file: /cvs/ports/games/alephone/alephone/Makefile,v
:retrieving revision 1.23
:diff -u -p -r1.23 Makefile
:--- Makefile   26 Jul 2017 22:45:20 -0000      1.23
:+++ Makefile   20 Apr 2018 00:46:12 -0000
:@@ -6,7 +6,7 @@ COMMENT =              open source game engine based
: DATE =                        20150620
: DISTNAME =            AlephOne-${DATE}
: PKGNAME =             alephone-1.2.1
:-REVISION =            0
:+REVISION =            1
: 
: EXTRACT_SUFX =                .tar.bz2
: CATEGORIES =          games x11
:@@ -48,5 +48,10 @@ AUTOMAKE_VER =              1.9
: CONFIGURE_ENV =               AUTOCONF_VERSION=${AUTOCONF_VER} \
:                       AUTOMAKE_VERSION=${AUTOMAKE_VER} \
:                       CPPFLAGS=-I${LOCALBASE}/include
:+
:+.include <bsd.port.arch.mk>
:+.if ${PROPERTIES:Mclang}
:+CXXFLAGS +=           -Wno-c++11-narrowing -Wno-deprecated-register
:+.endif
: 
: .include <bsd.port.mk>
:Index: patches/patch-Source_Files_Misc_sdl_dialogs_cpp
:===================================================================
:RCS file: patches/patch-Source_Files_Misc_sdl_dialogs_cpp
:diff -N patches/patch-Source_Files_Misc_sdl_dialogs_cpp
:--- /dev/null  1 Jan 1970 00:00:00 -0000
:+++ patches/patch-Source_Files_Misc_sdl_dialogs_cpp    20 Apr 2018 00:46:12 
-0000
:@@ -0,0 +1,14 @@
:+$OpenBSD$
:+
:+Index: Source_Files/Misc/sdl_dialogs.cpp
:+--- Source_Files/Misc/sdl_dialogs.cpp.orig
:++++ Source_Files/Misc/sdl_dialogs.cpp
:+@@ -2018,7 +2018,7 @@ void tab_placer::visible(bool visible)
:+ 
:+ dialog::dialog() : active_widget(NULL), mouse_widget(0), 
active_widget_num(UNONE), done(false),
:+             cursor_was_visible(false), parent_dialog(NULL),
:+-                processing_function(NULL), placer(0), last_redraw(0)
:++                processing_function(0), placer(0), last_redraw(0)
:+ {
:+ }
:+ 
:Index: patches/patch-Source_Files_Misc_sdl_widgets_cpp
:===================================================================
:RCS file: patches/patch-Source_Files_Misc_sdl_widgets_cpp
:diff -N patches/patch-Source_Files_Misc_sdl_widgets_cpp
:--- /dev/null  1 Jan 1970 00:00:00 -0000
:+++ patches/patch-Source_Files_Misc_sdl_widgets_cpp    20 Apr 2018 00:46:12 
-0000
:@@ -0,0 +1,32 @@
:+$OpenBSD$
:+
:+Index: Source_Files/Misc/sdl_widgets.cpp
:+--- Source_Files/Misc/sdl_widgets.cpp.orig
:++++ Source_Files/Misc/sdl_widgets.cpp
:+@@ -719,7 +719,7 @@ void w_select_button::place(const SDL_Rect &r, placeme
:+ 
:+ static const char* sNoValidOptionsString = "(no valid options)"; // XXX 
should be moved outside compiled code e.g. to MML
:+ 
:+-w_select::w_select(size_t s, const char **l) : widget(LABEL_WIDGET), 
labels(l), we_own_labels(false), selection(s), 
selection_changed_callback(NULL), utf8(false)
:++w_select::w_select(size_t s, const char **l) : widget(LABEL_WIDGET), 
labels(l), we_own_labels(false), selection(s), selection_changed_callback(0), 
utf8(false)
:+ {
:+      num_labels = 0;
:+         if(labels) {
:+@@ -1113,7 +1113,7 @@ void w_color_picker::draw(SDL_Surface *s) const
:+  */
:+ 
:+ w_text_entry::w_text_entry(size_t max_c, const char *initial_text)
:+-     : widget(TEXT_ENTRY_WIDGET), enter_pressed_callback(NULL), 
value_changed_callback(NULL), max_chars(max_c), enable_mac_roman(false)
:++     : widget(TEXT_ENTRY_WIDGET), enter_pressed_callback(0), 
value_changed_callback(0), max_chars(max_c), enable_mac_roman(false)
:+ {
:+      // Initialize buffer
:+      buf = new char[max_chars + 1];
:+@@ -2115,7 +2115,7 @@ void w_select_popup::gotSelected ()
:+ static const char* const sFileChooserInvalidFileString = "(no valid 
selection)";
:+ 
:+ w_file_chooser::w_file_chooser(const char* inDialogPrompt, Typecode 
inTypecode)
:+-     : w_select_button("", NULL, NULL, true), typecode(inTypecode)
:++     : w_select_button("", 0, NULL, true), typecode(inTypecode)
:+ {
:+      strncpy(dialog_prompt, inDialogPrompt, sizeof(dialog_prompt));
:+      set_selection(sFileChooserInvalidFileString);
:Index: patches/patch-Source_Files_Misc_sdl_widgets_h
:===================================================================
:RCS file: patches/patch-Source_Files_Misc_sdl_widgets_h
:diff -N patches/patch-Source_Files_Misc_sdl_widgets_h
:--- /dev/null  1 Jan 1970 00:00:00 -0000
:+++ patches/patch-Source_Files_Misc_sdl_widgets_h      20 Apr 2018 00:46:12 
-0000
:@@ -0,0 +1,56 @@
:+$OpenBSD$
:+
:+Index: Source_Files/Misc/sdl_widgets.h
:+--- Source_Files/Misc/sdl_widgets.h.orig
:++++ Source_Files/Misc/sdl_widgets.h
:+@@ -277,12 +277,12 @@ class w_button_base : public widget { (protected)
:+ 
:+ class w_button : public w_button_base {
:+ public:
:+-     w_button(const char *text, action_proc proc = NULL, void *arg = NULL) : 
w_button_base(text, proc, arg, BUTTON_WIDGET) {}
:++     w_button(const char *text, action_proc proc = 0, void *arg = NULL) : 
w_button_base(text, proc, arg, BUTTON_WIDGET) {}
:+ };
:+ 
:+ class w_tiny_button : public w_button_base {
:+ public:
:+-     w_tiny_button(const char *text, action_proc proc = NULL, void *arg = 
NULL) : w_button_base(text, proc, arg, TINY_BUTTON) {}
:++     w_tiny_button(const char *text, action_proc proc = 0, void *arg = NULL) 
: w_button_base(text, proc, arg, TINY_BUTTON) {}
:+ };
:+ 
:+ class w_hyperlink : public w_button_base {
:+@@ -802,7 +802,7 @@ class w_string_list : public w_list<string> { (private
:+ 
:+ class w_select_popup : public w_select_button {
:+ public:
:+-     w_select_popup (action_proc p = NULL, void *a = NULL);
:++     w_select_popup (action_proc p = 0, void *a = NULL);
:+      
:+      void set_labels (const vector<string>& inLabels);/* {labels = 
inLabels;}*/
:+      void set_selection (int value);
:+@@ -1079,7 +1079,7 @@ class ToggleWidget : public SDLWidgetWidget, public Bi
:+      ToggleWidget (w_toggle* toggle)
:+              : SDLWidgetWidget (toggle)
:+              , m_toggle (toggle)
:+-             , m_callback (NULL)
:++             , m_callback (0)
:+              { m_toggle->set_selection_changed_callback 
(boost::bind(&ToggleWidget::massage_callback, this, _1)); }
:+ 
:+      void set_callback (ControlHitCallback callback) { m_callback = 
callback; }
:+@@ -1117,7 +1117,7 @@ class SelectorWidget : public SDLWidgetWidget, public 
:+ protected:
:+      SelectorWidget (widget* in_widget)
:+              : SDLWidgetWidget (in_widget)
:+-             , m_callback (NULL)
:++             , m_callback (0)
:+              {}
:+ 
:+      ControlHitCallback m_callback;
:+@@ -1201,7 +1201,7 @@ class ButtonWidget : public SDLWidgetWidget (public)
:+      ButtonWidget (w_button_base* button)
:+              : SDLWidgetWidget (button)
:+              , m_button (button)
:+-             , m_callback (NULL)
:++             , m_callback (0)
:+              { m_button->set_callback (bounce_callback, this); }
:+ 
:+      void set_callback (ControlHitCallback callback) { m_callback = 
callback; }
:Index: patches/patch-Source_Files_Network_Metaserver_SdlMetaserverClientUi_cpp
:===================================================================
:RCS file: 
patches/patch-Source_Files_Network_Metaserver_SdlMetaserverClientUi_cpp
:diff -N patches/patch-Source_Files_Network_Metaserver_SdlMetaserverClientUi_cpp
:--- /dev/null  1 Jan 1970 00:00:00 -0000
:+++ patches/patch-Source_Files_Network_Metaserver_SdlMetaserverClientUi_cpp    
20 Apr 2018 00:46:12 -0000
:@@ -0,0 +1,23 @@
:+$OpenBSD$
:+
:+Index: Source_Files/Network/Metaserver/SdlMetaserverClientUi.cpp
:+--- Source_Files/Network/Metaserver/SdlMetaserverClientUi.cpp.orig
:++++ Source_Files/Network/Metaserver/SdlMetaserverClientUi.cpp
:+@@ -64,7 +64,7 @@ class SdlMetaserverClientUi : public MetaserverClientU
:+              placer->add(new w_spacer(), true);
:+ 
:+              table_placer *players_games_placer = new table_placer(2, 
get_theme_space(SPACER_WIDGET));
:+-             w_players_in_room* players_in_room_w = new 
w_players_in_room(NULL, 216, get_theme_space(METASERVER_PLAYERS));
:++             w_players_in_room* players_in_room_w = new w_players_in_room(0, 
216, get_theme_space(METASERVER_PLAYERS));
:+              
:+              players_games_placer->col_flags(1, placeable::kFill);
:+              players_games_placer->dual_add(players_in_room_w, d);
:+@@ -119,7 +119,7 @@ class SdlMetaserverClientUi : public MetaserverClientU
:+              entry_cancel_placer->dual_add(chatentry_w, d);
:+              entry_cancel_placer->add_flags();
:+              
:+-             w_tiny_button* cancel_w = new w_tiny_button("CANCEL", NULL, &d);
:++             w_tiny_button* cancel_w = new w_tiny_button("CANCEL", 0, &d);
:+              entry_cancel_placer->dual_add(cancel_w, d);
:+ 
:+              placer->add_flags(placeable::kFill);
:Index: patches/patch-Source_Files_Network_network_dialogs_cpp
:===================================================================
:RCS file: patches/patch-Source_Files_Network_network_dialogs_cpp
:diff -N patches/patch-Source_Files_Network_network_dialogs_cpp
:--- /dev/null  1 Jan 1970 00:00:00 -0000
:+++ patches/patch-Source_Files_Network_network_dialogs_cpp     20 Apr 2018 
00:46:12 -0000
:@@ -0,0 +1,14 @@
:+$OpenBSD$
:+
:+Index: Source_Files/Network/network_dialogs.cpp
:+--- Source_Files/Network/network_dialogs.cpp.orig
:++++ Source_Files/Network/network_dialogs.cpp
:+@@ -2559,7 +2559,7 @@ class SdlGatherDialog : public GatherDialog (public)
:+      
:+              // m_dialog.add(new w_static_text("Players on Network"));
:+ 
:+-             w_joining_players_in_room* foundplayers_w = new 
w_joining_players_in_room(NULL, 320, 3);
:++             w_joining_players_in_room* foundplayers_w = new 
w_joining_players_in_room(0, 320, 3);
:+              placer->dual_add(foundplayers_w, m_dialog);
:+      
:+              horizontal_placer *autogather_placer = new 
horizontal_placer(get_theme_space(ITEM_WIDGET), true);

-- 
Philadelphia is not dull -- it just seems so
because it is next to exciting Camden, New Jersey.

Reply via email to