[frogatto] 01/05: fix compilation with gcc6

Martin Quinson mquinson at moszumanska.debian.org
Thu Aug 18 23:07:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

mquinson pushed a commit to branch master
in repository frogatto.

commit a47ea3f2e218a363508f79f8c70efb45301d6732
Author: Martin Quinson <martin.quinson at loria.fr>
Date:   Tue Aug 16 22:39:10 2016 +0200

    fix compilation with gcc6
---
 debian/changelog      |  1 +
 debian/patches/gcc6   | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series |  1 +
 3 files changed, 61 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 31007b7..cfc6110 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ frogatto (1.3.1+dfsg-3) UNRELEASED; urgency=low
 
   [ Martin Quinson ]
   * Change the menu section from 'Games/Action' to 'Games/Advantures'
+  * d/p/gcc6: fix compilation with gcc 6 (Closes: #833775)
 
   [ Vincent Cheng ]
   * Update email address.
diff --git a/debian/patches/gcc6 b/debian/patches/gcc6
new file mode 100644
index 0000000..48174f0
--- /dev/null
+++ b/debian/patches/gcc6
@@ -0,0 +1,59 @@
+---
+ src/debug_console.cpp |    2 +-
+ src/dialog.cpp        |    4 ++--
+ src/texture.hpp       |    2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/src/texture.hpp
++++ b/src/texture.hpp
+@@ -58,7 +58,7 @@
+ 	unsigned int get_id() const;
+ 	static void set_current_texture(unsigned int id);
+ 	void set_as_current_texture() const;
+-	bool valid() const { return id_; }
++	bool valid() const { return (bool) id_; }
+ 
+ 	static texture get(const std::string& str, int options=0);
+ 	static texture get(const std::string& str, const std::string& algorithm);
+--- a/src/debug_console.cpp
++++ b/src/debug_console.cpp
+@@ -257,7 +257,7 @@
+ 
+ 	int ypos = 100;
+ 	foreach(const graphics::texture& t, messages()) {
+-		const SDL_Rect area = {0, ypos-2, t.width() + 10, t.height() + 5};
++		const SDL_Rect area = {0, (Sint16)(ypos-2), (Uint16)(t.width() + 10), (Uint16)(t.height() + 5)};
+ 		graphics::draw_rect(area, graphics::color_black(), 128);
+ 		graphics::blit_texture(t, 5, ypos);
+ 		ypos += t.height() + 5;
+--- a/src/dialog.cpp
++++ b/src/dialog.cpp
+@@ -252,7 +252,7 @@
+ void dialog::handle_draw() const
+ {
+ 	if(clear_bg()) {
+-		SDL_Rect rect = {x(),y(),width(),height()};
++		SDL_Rect rect = {(Sint16)x(),(Sint16)y(),(Uint16)width(),(Uint16)height()};
+ 		SDL_Color col = {0,0,0,0};
+ 		graphics::draw_rect(rect,col,clear_bg_);
+ 
+@@ -272,7 +272,7 @@
+ 	}
+ 
+ 	if(background_framed_gui_element_.empty() == false) {
+-		SDL_Rect rect = {x(),y(),width(),height()};
++		SDL_Rect rect = {(Sint16)x(),(Sint16)y(),(Uint16)width(),(Uint16)height()};
+ 		SDL_Color col = {0,0,0,0};
+ 		graphics::draw_rect(rect, col, 204);
+ 		const_framed_gui_element_ptr window(framed_gui_element::get(background_framed_gui_element_));
+--- a/Makefile
++++ b/Makefile
+@@ -34,7 +34,7 @@
+ endif
+ 
+ # Initial compiler options, used before CXXFLAGS and CPPFLAGS.
+-BASE_CXXFLAGS += -g -fno-inline-functions -fthreadsafe-statics -Wnon-virtual-dtor -Werror -Wignored-qualifiers -Wformat -Wswitch
++BASE_CXXFLAGS += -g -fno-inline-functions -fthreadsafe-statics -Wnon-virtual-dtor -Wignored-qualifiers -Wformat -Wswitch -Wno-narrowing
+ 
+ # Compiler include options, used after CXXFLAGS and CPPFLAGS.
+ INC := $(shell pkg-config --cflags x11 sdl glu glew SDL_image libpng zlib)
diff --git a/debian/patches/series b/debian/patches/series
index 22af957..b59a560 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 fonts_dfsg
 boost153.patch
+gcc6

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/frogatto.git



More information about the Pkg-games-commits mailing list