aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/grfcodec-gcc-compat.patch
blob: 02685d46fdbd69abbc8a03eef3e5be59b84ee5e5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Fix type comparison issue that is a hard error in GCC 10.

Taken from upstream:

  https://github.com/OpenTTD/grfcodec/commit/bb692b2c723c5e87cc8f89f445928e97594d5b8f

diff --git a/src/command.cpp b/src/command.cpp
index 9aa0e14..1f32cf1 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -300,8 +300,9 @@ bool parse_comment(const string&line){
 		break;
 	case BEAUTIFY:{
 		commandstream>>command_part;
-		uint val=find_command(command_part,beaut),togglebit;
-		if(val!=(uint)-1&&val!=OFF)_commandState.beautifier=true;
+		int val=find_command(command_part,beaut);
+		uint togglebit;
+		if(val!=-1&&val!=OFF)_commandState.beautifier=true;
 		switch(val){
 		case -1:
 			IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
@@ -372,7 +373,7 @@ bool parse_comment(const string&line){
 dotoggle:
 			commandstream>>command_part;
 			val=find_command(command_part,beaut);
-			if(!commandstream||val==(uint)-1){
+			if(!commandstream||val==-1){
 				IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
 				return true;
 			}
¨s 2014-06-27gnu: Consolidate libjpeg, libpng, and libtiff into one module....* gnu/packages/image.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add image.scm and remove libjpeg.scm, libpng.scm, and libtiff.scm. * gnu/packages/libjpeg.scm, gnu/packages/libpng.scm, gnu/packages/libtiff.scm: Delete files. * gnu/packages/emacs.scm gnu/packages/games.scm, gnu/packages/gd.scm, gnu/packages/geeqie.scm, gnu/packages/ghostscript.scm, gnu/packages/gimp.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnustep.scm, gnu/packages/gnuzilla.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/imagemagick.scm, gnu/packages/inkscape.scm, gnu/packages/netpbm.scm, gnu/packages/pdf.scm, gnu/packages/plotutils.scm, gnu/packages/qemu.scm, gnu/packages/qt.scm, gnu/packages/scheme.scm, gnu/packages/sdl.scm, gnu/packages/slim.scm, gnu/packages/tcl.scm, gnu/packages/texlive.scm, gnu/packages/video.scm, gnu/packages/xiph.scm, gnu/packages/xorg.scm: Use (gnu packages image) module. David Thompson 2014-06-27gnu: Enable libvpx support in ffmpeg....* gnu/packages/video.scm (ffmpeg): Add libvpx input. David Thompson 2014-06-26gnu: Add libvpx....* gnu/packages/video.scm (libvpx): New variable. David Thompson