# HG changeset patch # User David A. Holland # Date 1370962801 14400 # Node ID 343af355df1b589f1ca8efce807a79743af150df # Parent 9b859d40640a0c5b022874fa2e6c4886bc330e81 Pass -Wunused. diff -r 9b859d40640a -r 343af355df1b CHANGES --- a/CHANGES Tue Jun 11 10:51:30 2013 -0400 +++ b/CHANGES Tue Jun 11 11:00:01 2013 -0400 @@ -1,5 +1,6 @@ pending - auto-recognize more builtin PowerPC and mips macros + - pass -Wunused (partly from Baptiste Daroussin) release 0.1 (20130610) - first release, works with at least some imake templates diff -r 9b859d40640a -r 343af355df1b directive.c --- a/directive.c Tue Jun 11 10:51:30 2013 -0400 +++ b/directive.c Tue Jun 11 11:00:01 2013 -0400 @@ -240,6 +240,9 @@ void d_else(struct place *p, struct place *p2, char *line) { + (void)p2; + (void)line; + if (ifstate->seenelse) { complain(p, "Multiple #else directives in one conditional"); complain_fail(); @@ -254,6 +257,9 @@ void d_endif(struct place *p, struct place *p2, char *line) { + (void)p2; + (void)line; + if (ifstate->prev == NULL) { complain(p, "Unmatched #endif"); complain_fail(); @@ -272,6 +278,8 @@ size_t pos, argpos; struct place p3, p4; + (void)p; + /* * line may be: * macro expansion @@ -332,6 +340,8 @@ void d_undef(struct place *p, struct place *p2, char *line) { + (void)p; + uncomment(line); oneword("#undef", p2, line); macro_undef(line); @@ -395,6 +405,9 @@ void d_line(struct place *p, struct place *p2, char *line) { + (void)p2; + (void)line; + /* XXX */ complain(p, "Sorry, no #line yet"); } @@ -435,6 +448,8 @@ void d_pragma(struct place *p, struct place *p2, char *line) { + (void)p2; + complain(p, "#pragma %s", line); complain_fail(); } diff -r 9b859d40640a -r 343af355df1b output.c --- a/output.c Tue Jun 11 10:51:30 2013 -0400 +++ b/output.c Tue Jun 11 11:00:01 2013 -0400 @@ -96,7 +96,7 @@ static void -filter_output(const struct place *p, const char *buf, size_t len) +filter_output(const char *buf, size_t len) { size_t pos, start; bool inesc = false; @@ -171,7 +171,7 @@ linebufpos += len; if (len == 1 && buf[0] == '\n') { - filter_output(&linebufplace, linebuf, linebufpos); + filter_output(linebuf, linebufpos); linebufpos = 0; } }