[quagga-dev 14700] Re: [PATCH 2/3] isisd: fix assert warning

Paul Jakma paul at jakma.org
Thu Feb 18 11:27:09 GMT 2016


On Tue, 16 Feb 2016, David Lamparter wrote:

> icc (the Intel C Compiler) "knows" that assert() can be disabled by
> setting specific optimisation flags, and therefore emits a warning about
> missing a return value after an "always-error" assert.
>
> Workaround by returning a value - this probably needs discussion and a
> better fix (for all places where the code needs to abort due to internal
> errors).

Ack, putting the return in is the robust thing to do. Who knows, the 
halting guarantee of assert in Quagga could change one way do.

> Signed-off-by: David Lamparter <equinox at opensourcerouting.org>
> ---
> isisd/isis_redist.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c
> index abb9ecd..552613a 100644
> --- a/isisd/isis_redist.c
> +++ b/isisd/isis_redist.c
> @@ -52,6 +52,7 @@ redist_protocol(int family)
>     return 1;
>
>   assert(!"Unsupported address family!");
> +  return 0;
> }
>
> static int
>

-- 
Paul Jakma	paul at jakma.org	@pjakma	Key ID: 64A2FF6A
Fortune:
   I marvel at the strength of human weakness.




More information about the Quagga-dev mailing list