]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix various misc warnings
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 2 Jul 2018 20:22:31 +0000 (16:22 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 2 Jul 2018 20:22:35 +0000 (16:22 -0400)
src/main/radiusd.c
src/modules/rlm_sigtran/log.c
src/modules/rlm_sigtran/sccp.c
src/modules/rlm_winbind/rlm_winbind.c

index b1c730c63ba349781bd3ad2a272b6b81155ec7a4..9d21c0b4764f16d75ab3aa1c690dba305db6b030 100644 (file)
@@ -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
 
index 2b2b021470f48a3100b6a89c0818da0588adca37..fd48c328d789996c168dc4412b9699ea59a31779 100644 (file)
@@ -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);
 
index ea298b738c93a212b210dbcd1bba89248a17f587..0d5204d1a542898aeb596daf0b7edd04e942020f 100644 (file)
@@ -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
index 174261e0a002567cd4662ff5ef8e7547eff40ee9..ae6d9aeeac4763750c5e5be2ba6c3ad856552037 100644 (file)
@@ -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.");