- Cast unused variables and parameters to void, do nothing
- Fixes the following compiler warnings on Windows:
rrd_open.c:
757:9: warning: unused parameter 'writelock' [-Wunused-parameter]
int writelock)
810:24: warning: unused variable 'rrd_simple_file'
[-Wunused-variable] rrd_simple_file_t *rrd_simple_file;
807:17: warning: unused parameter 'rrd_file' [-Wunused-parameter]
rrd_file_t *rrd_file,
808:12: warning: unused parameter 'rrd' [-Wunused-parameter]
rrd_t *rrd)
rrd_client.c:
746:39: warning: unused parameter 'client' [-Wunused-parameter]
static int connect_unix(rrd_client_t *client, const char *path)
/* {{{ */
746:59: warning: unused parameter 'path' [-Wunused-parameter]
static int connect_unix(rrd_client_t *client, const char *path)
/* {{{ */
const char *path)
{ /* {{{ */
#ifdef _WIN32
+ /* Silence unused parameter compiler warnings */
+ (void) client;
+ (void) path;
return (WSAEPROTONOSUPPORT);
#else
struct sockaddr_un sa;
#ifdef USE_WINDOWS_LOCK
/* _locking() does not support read locks; we always take a write lock */
rcstat = rrd_windows_lock(rrd_simple_file->fd);
+ /* Silence unused parameter compiler warning */
+ (void) writelock;
#else
{
struct flock lock;
#if defined DEBUG && DEBUG > 1
mincore_print(rrd_file, "after");
#endif
+#else /* #if defined USE_MADVISE || defined HAVE_POSIX_FADVISE */
+ /* Silence compiler warnings about unused variables and parameters */
+ (void) rrd_simple_file;
+ (void) rrd_file;
+ (void) rrd;
#endif /* without madvise and posix_fadvise it does not make much sense todo anything */
}