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

WINGs: Marked args as unused for compiler in widget resize callback code

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-10-19 22:17:53 +02:00
committed by Carlos R. Mafra
parent 0d8a530bc3
commit 702764a7b0
13 changed files with 39 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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) {

View File

@@ -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 */ ;

View File

@@ -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;