aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/config.c12
-rw-r--r--src/or/control.c5
-rw-r--r--src/or/dirserv.c4
-rw-r--r--src/or/rendservice.c2
4 files changed, 12 insertions, 11 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 7e49e157f..0d3b96294 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -86,16 +86,16 @@ typedef struct config_var_t {
* or_options_t.<b>member</b>"
*/
#define VAR(name,conftype,member,initvalue) \
- { name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(or_options_t, member), initvalue }
+ { name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(or_options_t, member), initvalue, NULL }
/** An entry for config_vars: "The option <b>name</b> is obsolete." */
-#define OBSOLETE(name) { name, CONFIG_TYPE_OBSOLETE, 0, NULL }
+#define OBSOLETE(name) { name, CONFIG_TYPE_OBSOLETE, 0, NULL, NULL }
/** Array of configuration options. Until we disallow nonstandard
* abbreviations, order is significant, since the first matching option will
* be chosen first.
*/
static config_var_t _option_vars[] = {
- VAR("AccountingMax", MEMUNIT, AccountingMax, "0 bytes"),
+ VAR("AccountingMax", MEMUNIT, AccountingMax, "0 bytes"),
VAR("AccountingMaxKB", UINT, _AccountingMaxKB, "0"),
VAR("AccountingStart", STRING, AccountingStart, NULL),
VAR("Address", STRING, Address, NULL),
@@ -189,12 +189,12 @@ static config_var_t _option_vars[] = {
VAR("UseHelperNodes", BOOL, UseHelperNodes, "0"),
VAR("User", STRING, User, NULL),
VAR("__LeaveStreamsUnattached", BOOL,LeaveStreamsUnattached, "0"),
- { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
+ { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL, NULL }
};
#undef VAR
#define VAR(name,conftype,member,initvalue) \
- { name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(or_state_t, member), initvalue }
+ { name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(or_state_t, member), initvalue, NULL }
static config_var_t _state_vars[] = {
VAR("AccountingBytesReadInterval", MEMUNIT, AccountingBytesReadInInterval,NULL),
VAR("AccountingBytesWrittenInInterval", MEMUNIT,
@@ -208,7 +208,7 @@ static config_var_t _state_vars[] = {
VAR("HelperNodes", LINELIST_V, HelperNodes, NULL),
VAR("LastWritten", ISOTIME, LastWritten, NULL),
- { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
+ { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL, NULL }
};
#undef VAR
diff --git a/src/or/control.c b/src/or/control.c
index e4e4eaab4..a1dd0532f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -409,7 +409,7 @@ get_escaped_string(const char *start, size_t in_len_max,
*outp++ = *cp++;
}
*outp = '\0';
- tor_assert((outp - *out) == *out_len);
+ tor_assert((outp - *out) == (int)*out_len);
return end+1;
}
@@ -1965,7 +1965,8 @@ connection_control_process_inbuf_v1(connection_t *conn)
* recognize it.
*/
cmd_len = 0;
- while (cmd_len < data_len && !TOR_ISSPACE(conn->incoming_cmd[cmd_len]))
+ while ((size_t)cmd_len < data_len
+ && !TOR_ISSPACE(conn->incoming_cmd[cmd_len]))
++cmd_len;
/*
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a8f5a679c..bc00dc860 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -422,8 +422,8 @@ dirserver_getinfo_unregistered(const char *question)
for (i = 0; i < smartlist_len(descriptor_list); ++i) {
ent = smartlist_get(descriptor_list, i);
r = dirserv_router_fingerprint_is_known(ent);
- if (ent->bandwidthcapacity >= min_bw &&
- ent->bandwidthrate >= min_bw &&
+ if (ent->bandwidthcapacity >= (size_t)min_bw &&
+ ent->bandwidthrate >= (size_t)min_bw &&
r == 0) {
/* then log this one */
tor_snprintf(buf, sizeof(buf),
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index c2e7e2180..ce3da6354 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -469,7 +469,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l
extend_info->identity_digest, DIGEST_LEN);
klen = ntohs(get_uint16(buf+7+DIGEST_LEN));
- if (len != 7+DIGEST_LEN+2+klen+20+128) {
+ if ((int)len != 7+DIGEST_LEN+2+klen+20+128) {
log_fn(LOG_WARN, "Bad length %u for version 2 INTRODUCE2 cell.", (int)len);
goto err;
}