Fix: Silence warning of function having no return value
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 15 Oct 2015 21:05:05 +0000 (17:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Oct 2015 18:54:22 +0000 (14:54 -0400)
Some compilers complain that codepaths which assert have
no return value. This is valid since assertions could
be compiled-out, resulting in an undefined return value.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/mi-lttng.c

index f0d074ea7a945e3bb8c1b3b2d37c2740938a363c..fc22e4e0cabeb34f9f75b78607d79d0b5337f7f2 100644 (file)
@@ -397,6 +397,7 @@ const char *mi_lttng_domaintype_string(enum lttng_domain_type value)
        default:
                /* Should not have an unknown domain */
                assert(0);
+               return NULL;
        }
 }
 
@@ -413,6 +414,7 @@ const char *mi_lttng_buffertype_string(enum lttng_buffer_type value)
        default:
                /* Should not have an unknow buffer type */
                assert(0);
+               return NULL;
        }
 }
 
This page took 0.032836 seconds and 4 git commands to generate.