1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

WUtil: Marked args as unused for compiler in a callback functions

As callback have a fixed prototype, it can be correct to not use all the
arguments, so this patch adds the appropriate stuff to avoid a false
report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-10-19 22:17:48 +02:00
committed by Carlos R. Mafra
parent 378a59f02e
commit 6dba612d58
3 changed files with 10 additions and 0 deletions

View File

@@ -679,6 +679,9 @@ static void mpm_get_user_name(WParserMacro *this, WMenuParser parser)
/* Number id of the user under which we are running */
static void mpm_get_user_id(WParserMacro *this, WMenuParser parser)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) parser;
if (this->value[0] != '\0') return; // Already evaluated, re-use previous
snprintf((char *) this->value, sizeof(this->value), "%d", getuid() );
}

View File

@@ -1766,6 +1766,10 @@ int wmkdirhier(const char *path)
static int wrmdirhier_fn(const char *path, const struct stat *st,
int type, struct FTW *ftw)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) st;
(void) ftw;
switch(type) {
case FTW_D:
break;

View File

@@ -136,6 +136,9 @@ static void synchronizeUserDefaults(void *foo)
{
UserDefaults *database = sharedUserDefaults;
/* Parameter not used, but tell the compiler that it is ok */
(void) foo;
while (database) {
if (!database->dontSync)
WMSynchronizeUserDefaults(database);