[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: |
Fri, 28 May 2004 09:57:19 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8841 >
Raimar Falke wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8841 >
>
> On Tue, May 25, 2004 at 10:57:34PM -0700, Jason Short wrote:
>
>><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.
>
>
> IMHO every switch should have a default. Can we move the return into
> the default?
IMO a switch on an enum should avoid a default if possible. That way
you get a warning if you miss a case.
jason
|
|