From: Christophe CURIS <[email protected]>

WINGs dispatches window resize events 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 <[email protected]>
---
 WINGs/wbox.c               | 3 +++
 WINGs/wbrowser.c           | 3 +++
 WINGs/wcolorwell.c         | 3 +++
 WINGs/wlist.c              | 3 +++
 WINGs/wprogressindicator.c | 3 +++
 WINGs/wruler.c             | 3 +++
 WINGs/wscroller.c          | 3 +++
 WINGs/wscrollview.c        | 3 +++
 WINGs/wslider.c            | 3 +++
 WINGs/wtabview.c           | 3 +++
 WINGs/wtext.c              | 3 +++
 WINGs/wtextfield.c         | 3 +++
 WINGs/wwindow.c            | 3 +++
 13 files changed, 39 insertions(+)

diff --git a/WINGs/wbox.c b/WINGs/wbox.c
index 494f590..8eff6ca 100644
--- a/WINGs/wbox.c
+++ b/WINGs/wbox.c
@@ -223,6 +223,9 @@ static void destroyBox(Box * bPtr)
 
 static void didResize(struct W_ViewDelegate *delegate, WMView * view)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) delegate;
+
        rearrange(view->self);
 }
 
diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c
index 594e81c..f1a29a1 100644
--- a/WINGs/wbrowser.c
+++ b/WINGs/wbrowser.c
@@ -434,6 +434,9 @@ static void willResizeBrowser(W_ViewDelegate * self, WMView 
* view, unsigned int
        int colX, colY;
        int i;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        assert(*width > 0);
        assert(*height > 0);
 
diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c
index 7c4bf05..172778c 100644
--- a/WINGs/wcolorwell.c
+++ b/WINGs/wcolorwell.c
@@ -218,6 +218,9 @@ static void willResizeColorWell(W_ViewDelegate * self, 
WMView * view, unsigned i
        WMColorWell *cPtr = (WMColorWell *) view->self;
        int bw;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        if (cPtr->flags.bordered) {
 
                if (*width < MIN_WIDTH)
diff --git a/WINGs/wlist.c b/WINGs/wlist.c
index 6e69a34..40d2d25 100644
--- a/WINGs/wlist.c
+++ b/WINGs/wlist.c
@@ -1103,6 +1103,9 @@ static void didResizeList(W_ViewDelegate * self, WMView * 
view)
 {
        WMList *lPtr = (WMList *) view->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        WMResizeWidget(lPtr->vScroller, 1, view->size.height - 2);
 
        updateDoubleBufferPixmap(lPtr);
diff --git a/WINGs/wprogressindicator.c b/WINGs/wprogressindicator.c
index 79b9ea0..374df5e 100644
--- a/WINGs/wprogressindicator.c
+++ b/WINGs/wprogressindicator.c
@@ -139,6 +139,9 @@ static void didResizeProgressIndicator(W_ViewDelegate * 
self, WMView * view)
        int width = pPtr->view->size.width;
        int height = pPtr->view->size.height;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        assert(width > 0);
        assert(height > 0);
 }
diff --git a/WINGs/wruler.c b/WINGs/wruler.c
index 3c2b12b..18f9cb7 100644
--- a/WINGs/wruler.c
+++ b/WINGs/wruler.c
@@ -297,6 +297,9 @@ static void rulerDidResize(W_ViewDelegate * self, WMView * 
view)
 {
        Ruler *rPtr = (Ruler *) view->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        createDrawBuffer(rPtr);
        rPtr->flags.redraw = True;
        paintRuler(rPtr);
diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c
index f037c24..4a5ae8c 100644
--- a/WINGs/wscroller.c
+++ b/WINGs/wscroller.c
@@ -134,6 +134,9 @@ static void willResizeScroller(W_ViewDelegate * self, 
WMView * view, unsigned in
 {
        WMScroller *sPtr = (WMScroller *) view->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        if (*width > *height) {
                sPtr->flags.horizontal = 1;
                *height = SCROLLER_WIDTH;
diff --git a/WINGs/wscrollview.c b/WINGs/wscrollview.c
index 091b1af..a21864e 100644
--- a/WINGs/wscrollview.c
+++ b/WINGs/wscrollview.c
@@ -199,6 +199,9 @@ static void reorganizeInterior(WMScrollView * sPtr)
 
 static void resizeScrollView(W_ViewDelegate * self, WMView * view)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        reorganizeInterior(view->self);
        updateScrollerProportion(view->self);
 }
diff --git a/WINGs/wslider.c b/WINGs/wslider.c
index 839930e..a18987a 100644
--- a/WINGs/wslider.c
+++ b/WINGs/wslider.c
@@ -258,6 +258,9 @@ static void didResizeSlider(W_ViewDelegate * self, WMView * 
view)
        int width = sPtr->view->size.width;
        int height = sPtr->view->size.height;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        assert(width > 0);
        assert(height > 0);
 
diff --git a/WINGs/wtabview.c b/WINGs/wtabview.c
index 86f7192..57a458c 100644
--- a/WINGs/wtabview.c
+++ b/WINGs/wtabview.c
@@ -740,6 +740,9 @@ static void rearrange(TabView * tPtr)
 
 static void didResize(struct W_ViewDelegate *deleg, WMView * view)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) deleg;
+
        rearrange(view->self);
 }
 
diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 362cfc3..8bb6016 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -1697,6 +1697,9 @@ static void textDidResize(W_ViewDelegate * self, WMView * 
view)
        unsigned short h = tPtr->view->size.height;
        unsigned short rh = 0, vw = 0, rel;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        rel = (tPtr->flags.relief == WRFlat);
 
        if (tPtr->ruler && tPtr->flags.rulerShown) {
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c
index be0fc41..45b72cc 100644
--- a/WINGs/wtextfield.c
+++ b/WINGs/wtextfield.c
@@ -650,6 +650,9 @@ static void didResizeTextField(W_ViewDelegate * self, 
WMView * view)
 {
        WMTextField *tPtr = (WMTextField *) view->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        tPtr->offsetWidth = WMAX((tPtr->view->size.height - 
WMFontHeight(tPtr->font)) / 2, 1);
 
        tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 
2 */ ;
diff --git a/WINGs/wwindow.c b/WINGs/wwindow.c
index 139cb53..e600f89 100644
--- a/WINGs/wwindow.c
+++ b/WINGs/wwindow.c
@@ -314,6 +314,9 @@ static void willResizeWindow(W_ViewDelegate * self, WMView 
* view, unsigned *wid
 {
        WMWindow *win = (WMWindow *) view->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        if (win->minSize.width > 0 && win->minSize.height > 0) {
                if (*width < win->minSize.width)
                        *width = win->minSize.width;
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to