Fix some unused variable warnings.

pull/1151/head
Roger A. Light 7 years ago
parent a4f68869bf
commit 05458eb35d

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

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

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

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

Loading…
Cancel
Save