Fix some unused variable warnings.

This commit is contained in:
Roger A. Light 2019-02-06 13:42:49 +00:00
parent a4f68869bf
commit 05458eb35d
4 changed files with 12 additions and 2 deletions

View File

@ -34,7 +34,9 @@ Contributors:
#include <mosquitto.h>
#include "client_shared.h"
#ifdef WITH_SOCKS
static int mosquitto__parse_socks_url(struct mosq_config *cfg, char *url);
#endif
static int client_config_line_proc(struct mosq_config *cfg, int pub_or_sub, int argc, char *argv[]);
@ -884,7 +886,9 @@ unknown_option:
int client_opts_set(struct mosquitto *mosq, struct mosq_config *cfg)
{
#ifdef WITH_SOCKS
int rc;
#endif
if(cfg->will_topic && mosquitto_will_set(mosq, cfg->will_topic,
cfg->will_payloadlen, cfg->will_payload, cfg->will_qos,

View File

@ -269,7 +269,9 @@ void config__init(struct mosquitto_db *db, struct mosquitto__config *config)
void config__cleanup(struct mosquitto__config *config)
{
int i;
#ifdef WITH_BRIDGE
int j;
#endif
mosquitto__free(config->clientid_prefixes);
mosquitto__free(config->persistence_location);
@ -583,7 +585,9 @@ int config__read(struct mosquitto_db *db, struct mosquitto__config *config, bool
int rc = MOSQ_ERR_SUCCESS;
struct config_recurse cr;
int lineno = 0;
#ifdef WITH_PERSISTENCE
int len;
#endif
struct mosquitto__config config_reload;
int i;

View File

@ -99,7 +99,9 @@ void context__cleanup(struct mosquitto_db *db, struct mosquitto *context, bool d
{
struct mosquitto__packet *packet;
struct mosquitto_client_msg *msg, *next;
#ifdef WITH_BRIDGE
int i;
#endif
if(!context) return;

View File

@ -128,11 +128,11 @@ int mosquitto_main_loop(struct mosquitto_db *db, mosq_sock_t *listensock, int li
#endif
#ifdef WITH_BRIDGE
int rc;
int err;
socklen_t len;
#endif
time_t expiration_check_time = 0;
char *id;
int err;
socklen_t len;
#ifndef WIN32
sigemptyset(&sigblock);