mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +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:
committed by
Carlos R. Mafra
parent
0d8a530bc3
commit
702764a7b0
@@ -223,6 +223,9 @@ static void destroyBox(Box * bPtr)
|
|||||||
|
|
||||||
static void didResize(struct W_ViewDelegate *delegate, WMView * view)
|
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);
|
rearrange(view->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -434,6 +434,9 @@ static void willResizeBrowser(W_ViewDelegate * self, WMView * view, unsigned int
|
|||||||
int colX, colY;
|
int colX, colY;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
assert(*width > 0);
|
assert(*width > 0);
|
||||||
assert(*height > 0);
|
assert(*height > 0);
|
||||||
|
|
||||||
|
|||||||
@@ -218,6 +218,9 @@ static void willResizeColorWell(W_ViewDelegate * self, WMView * view, unsigned i
|
|||||||
WMColorWell *cPtr = (WMColorWell *) view->self;
|
WMColorWell *cPtr = (WMColorWell *) view->self;
|
||||||
int bw;
|
int bw;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if (cPtr->flags.bordered) {
|
if (cPtr->flags.bordered) {
|
||||||
|
|
||||||
if (*width < MIN_WIDTH)
|
if (*width < MIN_WIDTH)
|
||||||
|
|||||||
@@ -1103,6 +1103,9 @@ static void didResizeList(W_ViewDelegate * self, WMView * view)
|
|||||||
{
|
{
|
||||||
WMList *lPtr = (WMList *) view->self;
|
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);
|
WMResizeWidget(lPtr->vScroller, 1, view->size.height - 2);
|
||||||
|
|
||||||
updateDoubleBufferPixmap(lPtr);
|
updateDoubleBufferPixmap(lPtr);
|
||||||
|
|||||||
@@ -139,6 +139,9 @@ static void didResizeProgressIndicator(W_ViewDelegate * self, WMView * view)
|
|||||||
int width = pPtr->view->size.width;
|
int width = pPtr->view->size.width;
|
||||||
int height = pPtr->view->size.height;
|
int height = pPtr->view->size.height;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
assert(width > 0);
|
assert(width > 0);
|
||||||
assert(height > 0);
|
assert(height > 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,9 @@ static void rulerDidResize(W_ViewDelegate * self, WMView * view)
|
|||||||
{
|
{
|
||||||
Ruler *rPtr = (Ruler *) view->self;
|
Ruler *rPtr = (Ruler *) view->self;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
createDrawBuffer(rPtr);
|
createDrawBuffer(rPtr);
|
||||||
rPtr->flags.redraw = True;
|
rPtr->flags.redraw = True;
|
||||||
paintRuler(rPtr);
|
paintRuler(rPtr);
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ static void willResizeScroller(W_ViewDelegate * self, WMView * view, unsigned in
|
|||||||
{
|
{
|
||||||
WMScroller *sPtr = (WMScroller *) view->self;
|
WMScroller *sPtr = (WMScroller *) view->self;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if (*width > *height) {
|
if (*width > *height) {
|
||||||
sPtr->flags.horizontal = 1;
|
sPtr->flags.horizontal = 1;
|
||||||
*height = SCROLLER_WIDTH;
|
*height = SCROLLER_WIDTH;
|
||||||
|
|||||||
@@ -199,6 +199,9 @@ static void reorganizeInterior(WMScrollView * sPtr)
|
|||||||
|
|
||||||
static void resizeScrollView(W_ViewDelegate * self, WMView * view)
|
static void resizeScrollView(W_ViewDelegate * self, WMView * view)
|
||||||
{
|
{
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
reorganizeInterior(view->self);
|
reorganizeInterior(view->self);
|
||||||
updateScrollerProportion(view->self);
|
updateScrollerProportion(view->self);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,6 +258,9 @@ static void didResizeSlider(W_ViewDelegate * self, WMView * view)
|
|||||||
int width = sPtr->view->size.width;
|
int width = sPtr->view->size.width;
|
||||||
int height = sPtr->view->size.height;
|
int height = sPtr->view->size.height;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
assert(width > 0);
|
assert(width > 0);
|
||||||
assert(height > 0);
|
assert(height > 0);
|
||||||
|
|
||||||
|
|||||||
@@ -740,6 +740,9 @@ static void rearrange(TabView * tPtr)
|
|||||||
|
|
||||||
static void didResize(struct W_ViewDelegate *deleg, WMView * view)
|
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);
|
rearrange(view->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1697,6 +1697,9 @@ static void textDidResize(W_ViewDelegate * self, WMView * view)
|
|||||||
unsigned short h = tPtr->view->size.height;
|
unsigned short h = tPtr->view->size.height;
|
||||||
unsigned short rh = 0, vw = 0, rel;
|
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);
|
rel = (tPtr->flags.relief == WRFlat);
|
||||||
|
|
||||||
if (tPtr->ruler && tPtr->flags.rulerShown) {
|
if (tPtr->ruler && tPtr->flags.rulerShown) {
|
||||||
|
|||||||
@@ -650,6 +650,9 @@ static void didResizeTextField(W_ViewDelegate * self, WMView * view)
|
|||||||
{
|
{
|
||||||
WMTextField *tPtr = (WMTextField *) view->self;
|
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->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
|
||||||
|
|
||||||
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 2 */ ;
|
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 2 */ ;
|
||||||
|
|||||||
@@ -314,6 +314,9 @@ static void willResizeWindow(W_ViewDelegate * self, WMView * view, unsigned *wid
|
|||||||
{
|
{
|
||||||
WMWindow *win = (WMWindow *) view->self;
|
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 (win->minSize.width > 0 && win->minSize.height > 0) {
|
||||||
if (*width < win->minSize.width)
|
if (*width < win->minSize.width)
|
||||||
*width = win->minSize.width;
|
*width = win->minSize.width;
|
||||||
|
|||||||
Reference in New Issue
Block a user