Hi!
We're trying to compile Tor with cparser and got some warnings and an error.
src/or/dirserv.c:803:1: error: declaration 'was_router_added_t dirserv_add_extrainfo(extrainfo_t*, const char**)' is incompatible with 'int dirserv_add_extrainfo(extrainfo_t*, const char**)' (declared at line 96:12) src/or/dirserv.c:81:14: warning: unnecessary static forward declaration for 'char* format_versions_list(config_line_t*)' [-Wredundant-decls] src/or/dirserv.c:2186:8: warning: statement is empty [-Wempty-statement] src/or/dirserv.c:2210:8: warning: statement is empty [-Wempty-statement] src/or/dirserv.c:2752:51: warning: statement is empty [-Wempty-statement] src/or/dirserv.c:3009:51: warning: statement is empty [-Wempty-statement] src/or/dirserv.c:3280:112: warning: statement is empty [-Wempty-statement] src/or/dirserv.c:3483:54: warning: statement is empty [-Wempty-statement] src/or/dirserv.c:3603:129: warning: statement is empty [-Wempty-statement] 1 error(s), 47 warning(s)
The attached patch fixes those the warnings that are unambiguously due to inconsistent style ("if (cond) {body};" -- removing extra semicolon) and fixes the warning due to inconsistently declared a return type (once declared as 'enum', once as 'int').
Is there a better place for sending patches that do not really require broad discussion?
Happy hacking!
Christian
On 10/14/12, Christian Grothoff christian@grothoff.org wrote:
Is there a better place for sending patches that do not really require broad discussion?
Post them in the bug tracker (https://trac.torproject.org/), preferably as the URL and branch name of a Git branch or as a patch in ‘git format-patch’ format.
Robert Ransom
On Sun, Oct 14, 2012 at 5:03 AM, Christian Grothoff christian@grothoff.org wrote:
Hi!
We're trying to compile Tor with cparser and got some warnings and an error.
Patch looks okay to me! In the future, it is indeed best to use the bugtracker. I've added it at https://trac.torproject.org/projects/tor/ticket/7115 , with a question to consider (on the tracker) about which branch to merge it into.
(I've made a ticket for it because one possible answer is "0.2.3", and we shouldn't merge anything into 0.2.3 without a ticket.)