]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/tevent: clang:
authorNoel Power <noel.power@suse.com>
Fri, 24 May 2019 13:01:30 +0000 (13:01 +0000)
committerNoel Power <npower@samba.org>
Tue, 11 Jun 2019 12:10:17 +0000 (12:10 +0000)
Fixes:

lib/tevent/tevent_wrapper.c:213:6: warning: Access to field 'destroyed' results in a dereference of a null pointer (loaded from variable 'glue') <--[clang]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
lib/tevent/tevent_wrapper.c

index deeb64ec177a8c4c48b90b6050998dde24c4240c..a0e915f67532ecd67f2ee26b2fc6c0e8d3963668 100644 (file)
@@ -208,6 +208,8 @@ static int tevent_wrapper_context_destructor(struct tevent_context *wrap_ev)
        if (glue == NULL) {
                tevent_abort(wrap_ev,
                        "tevent_wrapper_context_destructor() active on main");
+               /* static checker support, return below is never reached */
+               return -1;
        }
 
        if (glue->destroyed && glue->busy) {