Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8841) warning when compiling with NDEBUG
Home

[Freeciv-Dev] Re: (PR#8841) warning when compiling with NDEBUG

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8841) warning when compiling with NDEBUG
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 May 2004 22:57:34 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8841 >

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8841 >
> 
> agents.c:106: warning: control reaches end of non-void function

And a patch.

jason

? client/output
Index: client/agents/agents.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/agents.c,v
retrieving revision 1.29
diff -u -r1.29 agents.c
--- client/agents/agents.c      5 May 2004 20:39:15 -0000       1.29
+++ client/agents/agents.c      26 May 2004 05:56:46 -0000
@@ -100,9 +100,10 @@
            pcall1->arg.pos_arg.y == pcall2->arg.pos_arg.y);
   case OCT_NEW_TURN:
     return TRUE;
-  default:
-    assert(0);
   }
+
+  assert(0);
+  return FALSE;
 }
 
 /***********************************************************************

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