Package: fairymax / 4.8v-1

fix-return.patch Patch series | download
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Description: Fix FTBFS with clang
 Fix "error: non-void function 'main' should return a value" error.
 Based on a patch by Arthur Marble <arthur@info9.net>
Author: Vincent Legout <vincent@legout.info>
Bug-Debian: http://bugs.debian.org/743008

Index: fairymax/fairymax.c
===================================================================
--- fairymax.orig/fairymax.c
+++ fairymax/fairymax.c
@@ -435,7 +435,7 @@ void PrintVariants(int combo)
         FILE *f;
 
         f = fopen(INI_FILE, "r");
-        if(f==NULL) return;
+        if(f==NULL) return 0;
 
         /* search for game names in definition file */
         do {
@@ -498,7 +498,7 @@ void LoadGame(char *name)
                if(c == EOF) {
                    printf("telluser variant %s not supported\n", name);
                    fclose(f);
-                   return; /* keep old settings */
+                   return 0; /* keep old settings */
                }
            }
            currentVariant = count;
Index: fairymax/maxqi.c
===================================================================
--- fairymax.orig/maxqi.c
+++ fairymax/maxqi.c
@@ -386,7 +386,7 @@ void PrintVariants()
         FILE *f;
 
         f = fopen(inifile, "r");
-        if(f==NULL) return;
+        if(f==NULL) return 0;
 
         /* search for game names in definition file */
         do {
@@ -422,7 +422,7 @@ void LoadGame(char *name)
                if(c == EOF) {
                    printf("telluser variant %s not supported\n", name);
                    fclose(f);
-                   return; /* keep old settings */
+                   return 0; /* keep old settings */
                }
            }
            currentVariant = count;