1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

wmaker: Marked args as unused for compiler in XClickEvent callback code

The toolkit dispatches X events for MouseButton using callback functions,
which means having a fixed argument list for that 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:
Christophe CURIS
2013-10-13 22:44:06 +02:00
committed by Carlos R. Mafra
parent c34a55ed5a
commit 3857def779
2 changed files with 31 additions and 0 deletions

View File

@@ -2669,6 +2669,9 @@ static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
{
WWindow *wwin = data;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
#ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) {
@@ -2711,6 +2714,9 @@ static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
{
WWindow *wwin = data;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
event->xbutton.state &= w_global.shortcut.modifiers_mask;
if (event->xbutton.button == Button1) {
@@ -2826,6 +2832,9 @@ static void titlebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
{
WWindow *wwin = (WWindow *) data;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
#ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask) != (event->xbutton.state & ~LockMask))
wwarning(_("The NumLock, ScrollLock or similar key seems to be turned on. "
@@ -2889,6 +2898,9 @@ static void windowCloseClick(WCoreWindow *sender, void *data, XEvent *event)
{
WWindow *wwin = data;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
event->xbutton.state &= w_global.shortcut.modifiers_mask;
CloseWindowMenu(wwin->screen_ptr);
@@ -2912,6 +2924,9 @@ static void windowCloseDblClick(WCoreWindow *sender, void *data, XEvent *event)
{
WWindow *wwin = data;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
CloseWindowMenu(wwin->screen_ptr);
if (event->xbutton.button < Button1 || event->xbutton.button > Button3)
@@ -2933,6 +2948,9 @@ static void windowLanguageClick(WCoreWindow *sender, void *data, XEvent *event)
WScreen *scr = fwin->screen_ptr;
int tl;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
if (event->xbutton.button != Button1 && event->xbutton.button != Button3)
return;
tl = wwin->frame->languagemode;
@@ -2952,6 +2970,9 @@ static void windowIconifyClick(WCoreWindow *sender, void *data, XEvent *event)
{
WWindow *wwin = data;
/* Parameter not used, but tell the compiler that it is ok */
(void) sender;
event->xbutton.state &= w_global.shortcut.modifiers_mask;
CloseWindowMenu(wwin->screen_ptr);