Mercurial > ~dholland > hg > tradcpp > index.cgi
comparison directive.c @ 103:343af355df1b
Pass -Wunused.
author | David A. Holland |
---|---|
date | Tue, 11 Jun 2013 11:00:01 -0400 (2013-06-11) |
parents | 60184aa42604 |
children | 4483a14ee101 |
comparison
equal
deleted
inserted
replaced
102:9b859d40640a | 103:343af355df1b |
---|---|
238 | 238 |
239 static | 239 static |
240 void | 240 void |
241 d_else(struct place *p, struct place *p2, char *line) | 241 d_else(struct place *p, struct place *p2, char *line) |
242 { | 242 { |
243 (void)p2; | |
244 (void)line; | |
245 | |
243 if (ifstate->seenelse) { | 246 if (ifstate->seenelse) { |
244 complain(p, "Multiple #else directives in one conditional"); | 247 complain(p, "Multiple #else directives in one conditional"); |
245 complain_fail(); | 248 complain_fail(); |
246 } | 249 } |
247 | 250 |
252 | 255 |
253 static | 256 static |
254 void | 257 void |
255 d_endif(struct place *p, struct place *p2, char *line) | 258 d_endif(struct place *p, struct place *p2, char *line) |
256 { | 259 { |
260 (void)p2; | |
261 (void)line; | |
262 | |
257 if (ifstate->prev == NULL) { | 263 if (ifstate->prev == NULL) { |
258 complain(p, "Unmatched #endif"); | 264 complain(p, "Unmatched #endif"); |
259 complain_fail(); | 265 complain_fail(); |
260 } else { | 266 } else { |
261 ifstate_pop(); | 267 ifstate_pop(); |
269 void | 275 void |
270 d_define(struct place *p, struct place *p2, char *line) | 276 d_define(struct place *p, struct place *p2, char *line) |
271 { | 277 { |
272 size_t pos, argpos; | 278 size_t pos, argpos; |
273 struct place p3, p4; | 279 struct place p3, p4; |
280 | |
281 (void)p; | |
274 | 282 |
275 /* | 283 /* |
276 * line may be: | 284 * line may be: |
277 * macro expansion | 285 * macro expansion |
278 * macro(arg, arg, ...) expansion | 286 * macro(arg, arg, ...) expansion |
330 | 338 |
331 static | 339 static |
332 void | 340 void |
333 d_undef(struct place *p, struct place *p2, char *line) | 341 d_undef(struct place *p, struct place *p2, char *line) |
334 { | 342 { |
343 (void)p; | |
344 | |
335 uncomment(line); | 345 uncomment(line); |
336 oneword("#undef", p2, line); | 346 oneword("#undef", p2, line); |
337 macro_undef(line); | 347 macro_undef(line); |
338 } | 348 } |
339 | 349 |
393 | 403 |
394 static | 404 static |
395 void | 405 void |
396 d_line(struct place *p, struct place *p2, char *line) | 406 d_line(struct place *p, struct place *p2, char *line) |
397 { | 407 { |
408 (void)p2; | |
409 (void)line; | |
410 | |
398 /* XXX */ | 411 /* XXX */ |
399 complain(p, "Sorry, no #line yet"); | 412 complain(p, "Sorry, no #line yet"); |
400 } | 413 } |
401 | 414 |
402 //////////////////////////////////////////////////////////// | 415 //////////////////////////////////////////////////////////// |
433 | 446 |
434 static | 447 static |
435 void | 448 void |
436 d_pragma(struct place *p, struct place *p2, char *line) | 449 d_pragma(struct place *p, struct place *p2, char *line) |
437 { | 450 { |
451 (void)p2; | |
452 | |
438 complain(p, "#pragma %s", line); | 453 complain(p, "#pragma %s", line); |
439 complain_fail(); | 454 complain_fail(); |
440 } | 455 } |
441 | 456 |
442 //////////////////////////////////////////////////////////// | 457 //////////////////////////////////////////////////////////// |