diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-08 06:37:50 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-08 06:37:50 +0000 |
commit | 8f37357193399050763ea5093419631d5c5f34e3 (patch) | |
tree | 9e5a60d76135fbb292ae0e055501e875683d597d /src | |
parent | f50ddfd4dd4cc52eddf7ca1ba2ae96798fc516fb (diff) | |
download | tor-8f37357193399050763ea5093419631d5c5f34e3.tar.gz tor-8f37357193399050763ea5093419631d5c5f34e3.zip |
Make GCC v4 happy with heavy warnings enabled.
svn:r4922
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 12 | ||||
-rw-r--r-- | src/or/control.c | 5 | ||||
-rw-r--r-- | src/or/dirserv.c | 4 | ||||
-rw-r--r-- | src/or/rendservice.c | 2 |
4 files changed, 12 insertions, 11 deletions
diff --git a/src/or/config.c b/src/or/config.c index 7e49e157fb..0d3b96294b 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 e4e4eaab40..a1dd0532fe 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 a8f5a679cc..bc00dc8603 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 c2e7e21807..ce3da63542 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; } |