File lrs-compile.diff of Package lrslib

From: Jan Engelhardt <jengelh@inai.de>
Date: 2016-03-31 10:22:47.574917659 +0200

Attempt to fix really bad code (return-without-value and pre-ANSI function heads).

lrsnashlib.c:55:5: warning: 'return' with no value, in function returning non-void
	return; [multiple instances]
lrslib.cpp:1485:54: error: invalid conversion from 'void (*)()' to '__sighandler_t {aka void (*)(int)}' [-fpermissive]
        errcheck ("signal", signal (SIGALRM, timecheck)); [multiple]

Index: lrslib-061/lrslib.c
===================================================================
--- lrslib-061.orig/lrslib.c
+++ lrslib-061/lrslib.c
@@ -65,10 +65,10 @@ static double get_time();
 /* signals handling            */
 /*******************************/
 #ifdef SIGNALS
-static void checkpoint ();
-static void die_gracefully ();
+static void checkpoint (int);
+static void die_gracefully (int);
 static void setup_signals ();
-static void timecheck ();
+static void timecheck (int);
 #endif
 
 /*******************************/
@@ -5292,7 +5292,7 @@ setup_signals ()
 }
 
 static void
-timecheck ()
+timecheck (int s)
 {
   lrs_dump_state ();
   errcheck ("signal", signal (SIGALRM, timecheck));
@@ -5300,14 +5300,14 @@ timecheck ()
 }
 
 static void
-checkpoint ()
+checkpoint (int s)
 {
   lrs_dump_state ();
   errcheck ("signal", signal (SIGUSR1, checkpoint));
 }
 
 static void
-die_gracefully ()
+die_gracefully (int s)
 {
   lrs_dump_state ();
 
Index: lrslib-061/lrsnashlib.c
===================================================================
--- lrslib-061.orig/lrsnashlib.c
+++ lrslib-061/lrsnashlib.c
@@ -52,7 +52,7 @@ int lrs_solve_nash(game * g)
 
   Q1 = lrs_alloc_dat("LRS globals");    /* allocate and init structure for static problem data */
   if (Q1 == NULL) {
-    return;
+    return 1;
   }
 
   Q1->nash = TRUE;
@@ -64,7 +64,7 @@ int lrs_solve_nash(game * g)
 
   P1 = lrs_alloc_dic(Q1);       /* allocate and initialize lrs_dic */
   if (P1 == NULL) {
-    return;
+    return 1;
   }
 
   BuildRep(P1, Q1, g, 1, 0);
@@ -74,7 +74,7 @@ int lrs_solve_nash(game * g)
   /* allocate and init structure for player 2's problem data */
   Q2 = lrs_alloc_dat("LRS globals");
   if (Q2 == NULL) {
-    return;
+    return 1;
   }
 
   Q2->debug = Debug_flag;
@@ -86,7 +86,7 @@ int lrs_solve_nash(game * g)
 
   P2orig = lrs_alloc_dic(Q2);   /* allocate and initialize lrs_dic */
   if (P2orig == NULL) {
-    return;
+    return 1;
   }
   BuildRep(P2orig, Q2, g, 0, 1);
   A2orig = P2orig->A;
openSUSE Build Service is sponsored by