Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3427) Remove noreturn attribute
Home

[Freeciv-Dev] (PR#3427) Remove noreturn attribute

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3427) Remove noreturn attribute
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 14 Feb 2003 08:28:50 -0800
Reply-to: rt@xxxxxxxxxxxxxx


Non-gcc compiler will complain about the missing return statements and
so on.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Two OS engineers facing a petri net chart:
        "dead lock in four moves!"

Index: ai/aiunit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v
retrieving revision 1.262
diff -u -u -r1.262 aiunit.c
--- ai/aiunit.c 2003/02/10 21:43:40     1.262
+++ ai/aiunit.c 2003/02/14 16:25:10
@@ -294,6 +294,7 @@
   default:
     die("ai/aiunit.c:unit_move_turns: illegal move type %d",
        unit_type(punit)->move_type);
+    move_time = 0;
   }
   return move_time;
 }
Index: common/hash.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/hash.c,v
retrieving revision 1.24
diff -u -u -r1.24 hash.c
--- common/hash.c       2003/02/08 11:21:46     1.24
+++ common/hash.c       2003/02/14 16:25:13
@@ -464,6 +464,7 @@
     return deleted;
   }
   die("Full hash table -- and somehow did not resize!!");
+  return NULL;
 }
 
 /**************************************************************************
@@ -613,6 +614,7 @@
     counter++;
   }
   die("never reached");
+  return NULL;
 }
 
 /**************************************************************************
Index: common/player.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/player.c,v
retrieving revision 1.111
diff -u -u -r1.111 player.c
--- common/player.c     2003/02/12 22:22:33     1.111
+++ common/player.c     2003/02/14 16:25:15
@@ -506,6 +506,7 @@
   if (type < DS_LAST)
     return Q_(ds_names[type]);
   die("Bad diplstate_type in diplstate_text: %d", type);
+  return NULL;
 }
 
 /***************************************************************
Index: common/shared.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.h,v
retrieving revision 1.110
diff -u -u -r1.110 shared.h
--- common/shared.h     2002/12/18 19:05:22     1.110
+++ common/shared.h     2003/02/14 16:25:15
@@ -164,7 +164,7 @@
      fc__attribute((format (printf, 3, 4)));
 
 void die(const char *format, ...)
-     fc__attribute((format (printf, 1, 2))) fc__attribute((noreturn));
+     fc__attribute((format (printf, 1, 2)));
 
 char *user_home_dir(void);
 char *user_username(void);
Index: common/tech.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/tech.c,v
retrieving revision 1.57
diff -u -u -r1.57 tech.c
--- common/tech.c       2003/02/12 22:22:34     1.57
+++ common/tech.c       2003/02/14 16:25:16
@@ -388,6 +388,7 @@
   default:
     die("Invalid tech_cost_style %d %d", game.rgame.tech_cost_style,
        tech_cost_style);
+    cost = 0;
   }
 
   /* Research becomes more expensive. */
Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.169
diff -u -u -r1.169 unit.c
--- common/unit.c       2003/01/09 02:36:37     1.169
+++ common/unit.c       2003/02/14 16:25:19
@@ -922,6 +922,7 @@
    default:
     die("Unknown unit activity %d in unit_activity_text()", punit->activity);
   }
+  return NULL;
 }
 
 /**************************************************************************
Index: server/gotohand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gotohand.c,v
retrieving revision 1.165
diff -u -u -r1.165 gotohand.c
--- server/gotohand.c   2003/02/10 21:43:42     1.165
+++ server/gotohand.c   2003/02/14 16:25:29
@@ -772,6 +772,7 @@
 
       default:
        move_cost = MAXCOST;    /* silence compiler warning */
+       total_cost = MAXCOST;   /* silence compiler warning */
        die("Bad move_type in find_the_shortest_path().");
       } /****** end switch ******/
 

[Prev in Thread] Current Thread [Next in Thread]