From: Antoine Busque Date: Mon, 9 May 2016 20:33:29 +0000 (-0400) Subject: Fix: remove NULL check of nonnull parameter in dlclose X-Git-Tag: v2.9.0-rc1~123 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e7953e6e102fdc71419cb2a7169468af46f568c4;p=lttng-ust.git Fix: remove NULL check of nonnull parameter in dlclose The `handle` parameter of `dlclose`, as defined in `include/lttng/ust-dlfcn.h` is marked `__nonnull`. GCC starting with version 6.1 emits warnings for comparisons of nonnull arguments against NULL by default (see -Wnonnull-compare). Therefore, this removes a superfluous NULL check on `handle`, for which GCC emitted a warning. Signed-off-by: Antoine Busque Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index 954d9dfc..ac3c951f 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -144,7 +144,7 @@ void *dlopen(const char *filename, int flag) int dlclose(void *handle) { - if (__tracepoint_ptrs_registered && handle) { + if (__tracepoint_ptrs_registered) { struct link_map *p = NULL; int ret;