Commits

David Lamparter authored f1fc327c7eb
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>
No tags

lib/command.c

Modified
2011 2011 if (src == NULL)
2012 2012 return dst;
2013 2013
2014 2014 if (strncmp (src, dst, strlen (src)) == 0)
2015 2015 return dst;
2016 2016 else
2017 2017 return NULL;
2018 2018
2019 2019 default:
2020 2020 assert(0);
2021 + return NULL;
2021 2022 }
2022 2023 }
2023 2024
2024 2025 /**
2025 2026 * Check whether a string is already present in a vector of strings.
2026 2027 * @param v A vector of char*.
2027 2028 * @param str A char*.
2028 2029 * @return 0 if str is already present in the vector, 1 otherwise.
2029 2030 */
2030 2031 static int

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut