diff options
| author | Alexander Barton <alex@barton.de> | 2008-07-27 20:35:01 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2008-07-27 20:35:01 +0200 |
| commit | e5cf73b9ee97bedce655dc1b404022772189717b (patch) | |
| tree | 95dee274ce41d13c4785dbde4b22e579bd0f6cb1 /src | |
| parent | 5df56111c492a0509c7b31d22021975778431bf3 (diff) | |
| download | ngircd-e5cf73b9ee97bedce655dc1b404022772189717b.tar.gz ngircd-e5cf73b9ee97bedce655dc1b404022772189717b.zip | |
Fix Validate_Args(): unused parameter "Idx" and "Req"
This patch fixes the following error message of GCC (tested with version 4.3.0) when not compiling ngIRCd in "strict RFC" mode: parse.c: In function "Validate_Args": parse.c:341: error: unused parameter "Idx" parse.c:341: error: unused parameter "Req"
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/parse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 24de2bc8..493fbdc0 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -338,17 +338,22 @@ Validate_Command( UNUSED CONN_ID Idx, UNUSED REQUEST *Req, bool *Closed ) static bool +#ifdef STRICT_RFC Validate_Args(CONN_ID Idx, REQUEST *Req, bool *Closed) +#else +Validate_Args(UNUSED CONN_ID Idx, UNUSED REQUEST *Req, bool *Closed) +#endif { #ifdef STRICT_RFC int i; #endif - assert( Idx >= 0 ); - assert( Req != NULL ); *Closed = false; #ifdef STRICT_RFC + assert( Idx >= 0 ); + assert( Req != NULL ); + /* CR and LF are never allowed in command parameters. * But since we do accept lines terminated only with CR or LF in * "non-RFC-compliant mode" (besides the correct CR+LF combination), |