From: Arran Cudbard-Bell Date: Mon, 2 Jul 2018 20:22:31 +0000 (-0400) Subject: Fix various misc warnings X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad7840e1de2db8bbe9329e3fe474e6d2ffda53d8;p=thirdparty%2Ffreeradius-server.git Fix various misc warnings --- diff --git a/src/main/radiusd.c b/src/main/radiusd.c index b1c730c63ba..9d21c0b4764 100644 --- a/src/main/radiusd.c +++ b/src/main/radiusd.c @@ -65,6 +65,7 @@ char const *radiusd_version = RADIUSD_VERSION_STRING_BUILD("FreeRADIUS"); static pid_t radius_pid; #ifdef HAVE_SYSTEMD_WATCHDOG +extern struct timeval sd_watchdog_interval; struct timeval sd_watchdog_interval; #endif diff --git a/src/modules/rlm_sigtran/log.c b/src/modules/rlm_sigtran/log.c index 2b2b021470f..fd48c328d78 100644 --- a/src/modules/rlm_sigtran/log.c +++ b/src/modules/rlm_sigtran/log.c @@ -62,7 +62,7 @@ static void do_log(UNUSED struct log_target *target, unsigned int level, const c void sigtran_log_init(TALLOC_CTX *ctx) { struct log_target *log; - static struct log_info info = {}; + static struct log_info info; log_init(&info, ctx); diff --git a/src/modules/rlm_sigtran/sccp.c b/src/modules/rlm_sigtran/sccp.c index ea298b738c9..0d5204d1a54 100644 --- a/src/modules/rlm_sigtran/sccp.c +++ b/src/modules/rlm_sigtran/sccp.c @@ -71,19 +71,15 @@ static int sigtran_txn_cmp(void const *a, void const *b) static void sigtran_tcap_timeout(void *data) { - REQUEST *request; + REQUEST *request = NULL; sigtran_transaction_t *txn = talloc_get_type_abort(data, sigtran_transaction_t); /* * Only do RDEBUG if the transaction is still active. */ - if (!txn->ctx.defunct) { - request = txn->ctx.request; + if (!txn->ctx.defunct) request = txn->ctx.request; - REDEBUG("OTID %u Invoke ID %u timeout", txn->ctx.otid, txn->ctx.invoke_id); - } else { - DEBUG("OTID %u Invoke ID %u timeout", txn->ctx.otid, txn->ctx.invoke_id); - } + ROPTIONAL(REDEBUG, ERROR, "OTID %u Invoke ID %u timeout", txn->ctx.otid, txn->ctx.invoke_id); /* * Remove the outstanding transaction diff --git a/src/modules/rlm_winbind/rlm_winbind.c b/src/modules/rlm_winbind/rlm_winbind.c index 174261e0a00..ae6d9aeeac4 100644 --- a/src/modules/rlm_winbind/rlm_winbind.c +++ b/src/modules/rlm_winbind/rlm_winbind.c @@ -434,11 +434,12 @@ no_domain: * @param[in] instance This module's instance (unused) * @return 0 */ -static int mod_detach(UNUSED void *instance) +static int mod_detach(void *instance) { rlm_winbind_t *inst = instance; fr_pool_free(inst->wb_pool); + return 0; } @@ -459,7 +460,6 @@ static int mod_detach(UNUSED void *instance) static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *thread, REQUEST *request) { rlm_winbind_t const *inst = instance; - VALUE_PAIR *vp; if (!request->password || (request->password->da != attr_user_password)) { RDEBUG("No User-Password found in the request; not doing winbind authentication.");