mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
util: Marked args as unused for compiler in X Error handlers
When an error occurs in X, the Xlib is using a callback mechanism to execute application code to handle the problem, which means having a fixed argument list for that application function. It is then 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:
committed by
Carlos R. Mafra
parent
2757713637
commit
cd78f11abc
@@ -786,6 +786,10 @@ static Pixmap duplicatePixmap(Pixmap pixmap, int width, int height)
|
||||
|
||||
static int dummyErrorHandler(Display * dpy, XErrorEvent * err)
|
||||
{
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) dpy;
|
||||
(void) err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ static void print_help(void)
|
||||
|
||||
static int errorHandler(Display * dpy, XErrorEvent * err)
|
||||
{
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) dpy;
|
||||
(void) err;
|
||||
|
||||
/* ignore all errors */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user