Browse Source

lib: assert(0) still needs a return

assert(0) is not guaranteed to not return since assert() in general can
be optimised out when building without debug / with optimisation.  This
breaks the build in clang, which warns/errors about the missing return.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter 5 years ago
parent
commit
f1fc327c7e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      lib/command.c

+ 1 - 0
lib/command.c

@@ -2018,6 +2018,7 @@ cmd_entry_function_desc (const char *src, struct cmd_token *token)
 
       default:
         assert(0);
+        return NULL;
     }
 }