From: <arc...@us...> - 2013-02-15 00:43:51
|
Revision: 630 http://sourceforge.net/p/sipp/code/630 Author: arcady-91 Date: 2013-02-15 00:43:48 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Suppressing warnings about unused variables where appropriate Modified Paths: -------------- sipp/trunk/deadcall.cpp sipp/trunk/sipp.cpp sipp/trunk/sslthreadsafe.c sipp/trunk/stat.cpp Modified: sipp/trunk/deadcall.cpp =================================================================== --- sipp/trunk/deadcall.cpp 2013-02-15 00:43:41 UTC (rev 629) +++ sipp/trunk/deadcall.cpp 2013-02-15 00:43:48 UTC (rev 630) @@ -65,6 +65,11 @@ bool deadcall::process_incoming(char * msg, struct sockaddr_storage *src) { char buffer[MAX_HEADER_LEN]; + // We want the src parameter, as it means we have a consistent + // interface - cast it to void to suppress warnings. + + (void)src; + CStat::globalStat(CStat::E_DEAD_CALL_MSGS); setRunning(); Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2013-02-15 00:43:41 UTC (rev 629) +++ sipp/trunk/sipp.cpp 2013-02-15 00:43:48 UTC (rev 630) @@ -63,6 +63,11 @@ int passwd_call_back_routine(char *buf , int size , int flag, void *passwd) { + +/* We need the flag parameter as this is a callback with defined arguments, but + * we don't use it. Cast to void to avoid warnings. */ + (void)flag; + strncpy(buf, (char *)(passwd), size); buf[size - 1] = '\0'; return(strlen(buf)); @@ -574,6 +579,11 @@ int send_nowait_tls(SSL *ssl, const void *msg, int len, int flags) { + + /* We need the flags parameter as this is a callback with defined arguments, + * but we don't use it. Cast to void to avoid warnings. */ + (void)flags; + int initial_fd_flags; int rc; int fd; @@ -3615,6 +3625,10 @@ } void timeout_alarm(int param){ + /* We need the param parameter as this is a callback with defined arguments, + * but we don't use it. Cast to void to avoid warnings. */ + (void)param; + if (timeout_error) { ERROR("%s timed out after '%.3lf' seconds", scenario_file, ((double)clock_tick / 1000LL)); } Modified: sipp/trunk/sslthreadsafe.c =================================================================== --- sipp/trunk/sslthreadsafe.c 2013-02-15 00:43:41 UTC (rev 629) +++ sipp/trunk/sslthreadsafe.c 2013-02-15 00:43:48 UTC (rev 630) @@ -29,6 +29,14 @@ void locking_function ( int mode, int n, const char *file, int line) { + + /* file and line are needed because this is a callback with a defined + * interface, but we don't need them - cast them to void to suppress the + * warnings */ + + (void)file; + (void)line; + if (mode & CRYPTO_LOCK) MUTEX_LOCK(mutex_buf[n]); else Modified: sipp/trunk/stat.cpp =================================================================== --- sipp/trunk/stat.cpp 2013-02-15 00:43:41 UTC (rev 629) +++ sipp/trunk/stat.cpp 2013-02-15 00:43:48 UTC (rev 630) @@ -1816,6 +1816,11 @@ return time_string(value, s, len); } double CFixed::cdfInv(double percentile) { + + // We want the percentile parameter, as it means we have a consistent + // interface - cast it to void to suppress warnings. + (void)percentile; + return value; } @@ -1832,6 +1837,11 @@ return time_string(duration, s, len); } double CDefaultPause::cdfInv(double percentile) { + + // We want the percentile parameter, as it means we have a consistent + // interface - cast it to void to suppress warnings. + (void)percentile; + return duration; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |