This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via 9f1207342aa769b53a1c19e5b3555814703d1acf (commit)
via bd58625a3f30e506ea70b805e4c5a32f6c0d700c (commit)
via ea74fe8871a0805365623278942d539562fbcaa0 (commit)
via 237c386fdc0db7300826c068bad06f3edb19a7c4 (commit)
via 702764a7b0c957f8db62920e43150da672f6e340 (commit)
via 0d8a530bc30280da0b182a8666625bce8f3b7947 (commit)
via fed1bf4de34aecda481adfff9335929a301cc175 (commit)
via 58961dce72a9c257b8eb24ee781824af9ae9d284 (commit)
via 2dd4a34961ddff2760de56612630cf1ac5a94ed4 (commit)
via 6dba612d58b2f48959a3a87528a3192e7f94f26c (commit)
from 378a59f02e113923cde66612ca369667d8a8347c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/9f1207342aa769b53a1c19e5b3555814703d1acf
commit 9f1207342aa769b53a1c19e5b3555814703d1acf
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:57 2013 +0200
WINGs: Marked args as unused for compiler in WINGs API code
There are a few function in WING's API that take parameter for consistency
reason and for possible future evolution, but actually do not need the
argument.
As they are case we know about, this patch adds the appropriate stuff to
tell the compiler we are ok with this to avoid a false report.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/WINGs/wmenuitem.c b/WINGs/wmenuitem.c
index 1f51bca..ac813c5 100644
--- a/WINGs/wmenuitem.c
+++ b/WINGs/wmenuitem.c
@@ -33,6 +33,9 @@ WMMenuItem *WMGetSeparatorMenuItem(void)
Bool WMMenuItemIsSeparator(WMMenuItem * item)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) item;
+
return False;
}
diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index e9053cd..80295bc 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -3473,6 +3473,10 @@ static void destroyWidget(WMWidget * widget)
void WMDestroyTextBlock(WMText * tPtr, void *vtb)
{
TextBlock *tb = (TextBlock *) vtb;
+
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) tPtr;
+
if (!tb)
return;
http://repo.or.cz/w/wmaker-crm.git/commit/bd58625a3f30e506ea70b805e4c5a32f6c0d700c
commit bd58625a3f30e506ea70b805e4c5a32f6c0d700c
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:56 2013 +0200
WINGs: Marked args as unused for compiler in a few more callback functions
As callback have a fixed prototype, it is 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]>
diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c
index 172778c..a4b94ff 100644
--- a/WINGs/wcolorwell.c
+++ b/WINGs/wcolorwell.c
@@ -342,6 +342,9 @@ static void handleActionEvents(XEvent * event, void *data)
WMScreen *scr = WMWidgetScreen(cPtr);
WMColorPanel *cpanel;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) event;
+
if (cPtr->flags.active)
W_SetViewBackgroundColor(cPtr->view, scr->gray);
else
diff --git a/WINGs/winputmethod.c b/WINGs/winputmethod.c
index 01ecdc7..7d3aae0 100644
--- a/WINGs/winputmethod.c
+++ b/WINGs/winputmethod.c
@@ -10,6 +10,10 @@ typedef struct W_IMContext {
static void instantiateIM_cb(Display * display, XPointer client_data, XPointer
call_data)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) display;
+ (void) call_data;
+
W_InitIM((W_Screen *) client_data);
}
@@ -18,6 +22,9 @@ static void destroyIM_cb(XIM xim, XPointer client_data,
XPointer call_data)
W_Screen *scr = (W_Screen *) client_data;
W_View *target;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) call_data;
+
if (scr->imctx->xim != xim)
return;
diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 99b15b9..e9053cd 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -2059,6 +2059,10 @@ static WMData *requestHandler(WMView * view, Atom
selection, Atom target, void *
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
WMData *data = NULL;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) cdata;
+
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
char *text = WMGetTextSelectedStream(tPtr);
@@ -2093,6 +2097,10 @@ static WMData *requestHandler(WMView * view, Atom
selection, Atom target, void *
static void lostHandler(WMView * view, Atom selection, void *cdata)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) cdata;
+
releaseSelection((WMText *) view->self);
}
@@ -2340,6 +2348,12 @@ static void pasteText(WMView * view, Atom selection,
Atom target, Time timestamp
Text *tPtr = (Text *) view->self;
char *text;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) target;
+ (void) timestamp;
+ (void) cdata;
+
tPtr->flags.waitingForSelection = 0;
if (data) {
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c
index 45b72cc..de71244 100644
--- a/WINGs/wtextfield.c
+++ b/WINGs/wtextfield.c
@@ -244,6 +244,10 @@ static WMData *requestHandler(WMView * view, Atom
selection, Atom target, void *
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
WMData *data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) cdata;
+
count = tPtr->selection.count < 0
? tPtr->selection.position + tPtr->selection.count :
tPtr->selection.position;
@@ -281,6 +285,9 @@ static void lostSelection(WMView * view, Atom selection,
void *cdata)
{
TextField *tPtr = (WMTextField *) view->self;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) cdata;
+
if (tPtr->flags.ownsSelection) {
WMDeleteSelectionHandler(view, selection, CurrentTime);
tPtr->flags.ownsSelection = 0;
@@ -1310,6 +1317,12 @@ static void pasteText(WMView * view, Atom selection,
Atom target, Time timestamp
TextField *tPtr = (TextField *) view->self;
char *str;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) target;
+ (void) timestamp;
+ (void) cdata;
+
tPtr->flags.waitingSelection = 0;
if (data != NULL) {
http://repo.or.cz/w/wmaker-crm.git/commit/ea74fe8871a0805365623278942d539562fbcaa0
commit ea74fe8871a0805365623278942d539562fbcaa0
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:55 2013 +0200
WINGs: Marked args as unused for compiler in event callback code
The WINGs toolkit dispatch events on widgets using callbacks, which means
having a fixed argument list for the handling 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]>
diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c
index f1a29a1..d390407 100644
--- a/WINGs/wbrowser.c
+++ b/WINGs/wbrowser.c
@@ -480,6 +480,9 @@ static void paintItem(WMList * lPtr, int index, Drawable d,
char *text, int stat
WMColor *backColor = ((state & WLDSSelected) ? scr->white :
view->backColor);
int width, height, x, y, textLen;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) index;
+
width = rect->size.width;
height = rect->size.height;
x = rect->pos.x;
diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c
index 78e5649..d6bd79c 100644
--- a/WINGs/wcolorpanel.c
+++ b/WINGs/wcolorpanel.c
@@ -1129,6 +1129,9 @@ static void closeWindowCallback(WMWidget * w, void *data)
{
W_ColorPanel *panel = (W_ColorPanel *) data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
WMCloseColorPanel(panel);
}
@@ -1680,6 +1683,9 @@ static void magnifyPutCursor(WMWidget * w, void *data)
XEvent event;
WMPoint initialPosition;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
/* Destroy wheelBackImg, so it'll update properly */
if (panel->selectionBackImg) {
XFreePixmap(WMWidgetScreen(panel->win)->display,
panel->selectionBackImg);
@@ -2130,6 +2136,9 @@ static void wheelBrightnessSliderCallback(WMWidget * w,
void *data)
W_ColorPanel *panel = (W_ColorPanel *) data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
value = 255 - WMGetSliderValue(panel->wheelBrightnessS);
wheelCalculateValues(panel, value);
@@ -2275,6 +2284,9 @@ static void grayBrightnessSliderCallback(WMWidget * w,
void *data)
char tmp[4];
W_ColorPanel *panel = (W_ColorPanel *) data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
value = WMGetSliderValue(panel->grayBrightnessS);
sprintf(tmp, "%d", value);
@@ -2350,6 +2362,9 @@ static void rgbSliderCallback(WMWidget * w, void *data)
char tmp[4];
W_ColorPanel *panel = (W_ColorPanel *) data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
value[0] = WMGetSliderValue(panel->rgbRedS);
value[1] = WMGetSliderValue(panel->rgbGreenS);
value[2] = WMGetSliderValue(panel->rgbBlueS);
@@ -2422,6 +2437,9 @@ static void cmykSliderCallback(WMWidget * w, void *data)
W_ColorPanel *panel = (W_ColorPanel *) data;
double scale;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
value[0] = WMGetSliderValue(panel->cmykCyanS);
value[1] = WMGetSliderValue(panel->cmykMagentaS);
value[2] = WMGetSliderValue(panel->cmykYellowS);
@@ -2862,6 +2880,9 @@ static void customPaletteMenuCallback(WMWidget * w, void
*data)
W_ColorPanel *panel = (W_ColorPanel *) data;
int item = WMGetPopUpButtonSelectedItem(panel->customPaletteMenuBtn);
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
switch (item) {
case CPmenuNewFromFile:
customPaletteMenuNewFromFile(panel);
@@ -3200,6 +3221,9 @@ static void colorListColorMenuCallback(WMWidget * w, void
*data)
W_ColorPanel *panel = (W_ColorPanel *) data;
int item = WMGetPopUpButtonSelectedItem(panel->colorListColorMenuBtn);
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
switch (item) {
case CLmenuAdd:
break;
@@ -3215,6 +3239,9 @@ static void colorListListMenuCallback(WMWidget * w, void
*data)
W_ColorPanel *panel = (W_ColorPanel *) data;
int item = WMGetPopUpButtonSelectedItem(panel->colorListListMenuBtn);
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
switch (item) {
case CLmenuAdd:
/* New Color List */
diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c
index 56fdda5..8219ee6 100644
--- a/WINGs/wfilepanel.c
+++ b/WINGs/wfilepanel.c
@@ -551,6 +551,10 @@ static void fillColumn(WMBrowserDelegate * self, WMBrowser
* bPtr, int column, W
char *path;
WMFilePanel *panel;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) list;
+
if (column > 0) {
path = WMGetBrowserPathToColumn(bPtr, column - 1);
} else {
@@ -566,6 +570,9 @@ static void browserDClick(WMWidget *widget, void *p_panel)
{
WMFilePanel *panel = p_panel;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) widget;
+
WMPerformButtonClick(panel->okButton);
}
@@ -604,6 +611,9 @@ static void createDir(WMWidget *widget, void *p_panel)
size_t slen;
WMScreen *scr = WMWidgetScreen(panel->win);
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) widget;
+
dirName = WMRunInputPanel(scr, panel->win, _("Create Directory"),
_("Enter directory name"), "", _("OK"),
_("Cancel"));
if (!dirName)
@@ -688,6 +698,9 @@ static void deleteFile(WMWidget *widget, void *p_panel)
WMScreen *scr = WMWidgetScreen(panel->win);
#define __msgbufsize__ 512
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) widget;
+
buffer = wmalloc(__msgbufsize__);
file = getCurrentFileName(panel);
normalizePath(file);
@@ -733,6 +746,9 @@ static void goFloppy(WMWidget *widget, void *p_panel)
struct stat filestat;
WMScreen *scr = WMWidgetScreen(panel->win);
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) widget;
+
if (stat(WINGsConfiguration.floppyPath, &filestat)) {
showError(scr, panel->win, _("An error occured browsing
'%s'."), WINGsConfiguration.floppyPath);
return;
@@ -749,6 +765,9 @@ static void goHome(WMWidget *widget, void *p_panel)
WMFilePanel *panel = p_panel;
char *home;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) widget;
+
/* home is statically allocated. Don't free it! */
home = wgethomedir();
if (!home)
diff --git a/WINGs/wfontpanel.c b/WINGs/wfontpanel.c
index c6df7b3..3f29051 100644
--- a/WINGs/wfontpanel.c
+++ b/WINGs/wfontpanel.c
@@ -85,6 +85,10 @@ static void listFamilies(WMScreen * scr, WMFontPanel *
panel);
static void splitViewConstrainCallback(WMSplitView * sPtr, int indView, int
*min, int *max)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) sPtr;
+ (void) max;
+
if (indView == 0)
*min = MIN_UPPER_HEIGHT;
else
@@ -138,6 +142,9 @@ static void closeWindow(WMWidget * w, void *data)
{
FontPanel *panel = (FontPanel *) data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
WMHideFontPanel(panel);
}
@@ -145,12 +152,19 @@ static void setClickedAction(WMWidget * w, void *data)
{
FontPanel *panel = (FontPanel *) data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
if (panel->action)
(*panel->action) (panel, panel->data);
}
static void revertClickedAction(WMWidget * w, void *data)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+ (void) data;
+
/*FontPanel *panel = (FontPanel*)data; */
/* XXX TODO */
}
@@ -676,6 +690,9 @@ static void typefaceClick(WMWidget * w, void *data)
int sizei = -1;
void *size;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
osize = WMGetTextFieldText(panel->sizT);
item = WMGetListSelectedItem(panel->typLs);
@@ -715,6 +732,9 @@ static void sizeClick(WMWidget * w, void *data)
FontPanel *panel = (FontPanel *) data;
WMListItem *item;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
item = WMGetListSelectedItem(panel->sizLs);
WMSetTextFieldText(panel->sizT, item->text);
diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 8bb6016..99b15b9 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -2678,6 +2678,9 @@ static void rulerMoveCallBack(WMWidget * w, void *self)
{
Text *tPtr = (Text *) self;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
if (!tPtr)
return;
if (W_CLASS(tPtr) != WC_Text)
@@ -2690,6 +2693,9 @@ static void rulerReleaseCallBack(WMWidget * w, void *self)
{
Text *tPtr = (Text *) self;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) w;
+
if (!tPtr)
return;
if (W_CLASS(tPtr) != WC_Text)
http://repo.or.cz/w/wmaker-crm.git/commit/237c386fdc0db7300826c068bad06f3edb19a7c4
commit 237c386fdc0db7300826c068bad06f3edb19a7c4
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:54 2013 +0200
WINGs: 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 <[email protected]>
diff --git a/WINGs/dragcommon.c b/WINGs/dragcommon.c
index 8cce2ee..db5e5f1 100644
--- a/WINGs/dragcommon.c
+++ b/WINGs/dragcommon.c
@@ -95,6 +95,9 @@ char *WMGetDragOperationItemText(WMDragOperationItem * item)
static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) dpy;
+
if (errEvt->error_code == BadWindow || errEvt->error_code ==
BadDrawable) {
_WindowExists = False;
return Success;
diff --git a/WINGs/selection.c b/WINGs/selection.c
index 200b919..64d71fb 100644
--- a/WINGs/selection.c
+++ b/WINGs/selection.c
@@ -102,6 +102,10 @@ static void WMDeleteSelectionCallback(WMView * view, Atom
selection, Time timest
static int handleXError(Display * dpy, XErrorEvent * ev)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) dpy;
+ (void) ev;
+
gotXError = True;
return 1;
http://repo.or.cz/w/wmaker-crm.git/commit/702764a7b0c957f8db62920e43150da672f6e340
commit 702764a7b0c957f8db62920e43150da672f6e340
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:53 2013 +0200
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 <[email protected]>
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;
http://repo.or.cz/w/wmaker-crm.git/commit/0d8a530bc30280da0b182a8666625bce8f3b7947
commit 0d8a530bc30280da0b182a8666625bce8f3b7947
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:52 2013 +0200
WINGs: Marked args as unused for compiler in XDND callback code
The drag-n-drop mechanism is managed by WINGs through callbacks, which
means having a fixed argument list for the handling 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]>
diff --git a/WINGs/dragdestination.c b/WINGs/dragdestination.c
index 17bbd8a..3c828e8 100644
--- a/WINGs/dragdestination.c
+++ b/WINGs/dragdestination.c
@@ -407,6 +407,12 @@ storeDropData(WMView * destView, Atom selection, Atom
target, Time timestamp, vo
WMDraggingInfo *info = &(scr->dragInfo);
WMData *dataToStore = NULL;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) target;
+ (void) timestamp;
+ (void) cdata;
+
if (data != NULL)
dataToStore = WMRetainData(data);
@@ -888,6 +894,11 @@ void WMUnregisterViewDraggedTypes(WMView * view)
static WMDragOperationType
defAllowedOperation(WMView * self, WMDragOperationType requestedOperation,
WMArray * sourceDataTypes)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) requestedOperation;
+ (void) sourceDataTypes;
+
/* no operation allowed */
return WDOperationNone;
}
@@ -903,6 +914,11 @@ defAllowedOperation(WMView * self, WMDragOperationType
requestedOperation, WMArr
static WMArray *defRequiredDataTypes(WMView * self,
WMDragOperationType requestedOperation,
WMArray * sourceDataTypes)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) requestedOperation;
+ (void) sourceDataTypes;
+
/* no data type allowed (NULL even at 2nd pass) */
return NULL;
}
@@ -912,6 +928,8 @@ static WMArray *defRequiredDataTypes(WMView * self,
*/
static void defPrepareForDragOperation(WMView * self)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
}
/*
@@ -938,11 +956,18 @@ static void defPrepareForDragOperation(WMView * self)
static void
defPerformDragOperation(WMView * self, WMArray * dropDatas, WMArray *
operationList, WMPoint * dropLocation)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) dropDatas;
+ (void) operationList;
+ (void) dropLocation;
}
/* Executed after drop */
static void defConcludeDragOperation(WMView * self)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
}
void WMSetViewDragDestinationProcs(WMView * view, WMDragDestinationProcs *
procs)
diff --git a/WINGs/dragsource.c b/WINGs/dragsource.c
index 4b134b0..05d2c6a 100644
--- a/WINGs/dragsource.c
+++ b/WINGs/dragsource.c
@@ -132,6 +132,10 @@ static WMData *convertSelection(WMView * view, Atom
selection, Atom target, void
WMData *data;
char *typeName;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) selection;
+ (void) cdata;
+
scr = W_VIEW_SCREEN(view);
typeName = XGetAtomName(scr->display, target);
@@ -151,11 +155,22 @@ static WMData *convertSelection(WMView * view, Atom
selection, Atom target, void
static void selectionLost(WMView * view, Atom selection, void *cdata)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) view;
+ (void) selection;
+ (void) cdata;
+
wwarning("DND selection lost during drag operation...");
}
static void selectionDone(WMView * view, Atom selection, Atom target, void
*cdata)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) view;
+ (void) selection;
+ (void) target;
+ (void) cdata;
+
#ifdef XDND_DEBUG
printf("selection donen");
#endif
@@ -542,11 +557,17 @@ static void initSourceDragInfo(WMView * sourceView,
WMDraggingInfo * info)
*/
static WMArray *defDropDataTypes(WMView * self)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
return NULL;
}
static WMDragOperationType defWantedDropOperation(WMView * self)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
return WDOperationNone;
}
@@ -560,15 +581,26 @@ static WMDragOperationType defWantedDropOperation(WMView
* self)
static Bool defAcceptDropOperation(WMView * self, WMDragOperationType
allowedOperation)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) allowedOperation;
+
return False;
}
static void defBeganDrag(WMView * self, WMPoint * point)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) point;
}
static void defEndedDrag(WMView * self, WMPoint * point, Bool deposited)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) point;
+ (void) deposited;
}
/*
@@ -576,6 +608,10 @@ static void defEndedDrag(WMView * self, WMPoint * point,
Bool deposited)
*/
static WMData *defFetchDragData(WMView * self, char *type)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) type;
+
return NULL;
}
diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c
index 1793485..7c4bf05 100644
--- a/WINGs/wcolorwell.c
+++ b/WINGs/wcolorwell.c
@@ -279,11 +279,17 @@ static WMArray *dropDataTypes(WMView * self)
static WMDragOperationType wantedDropOperation(WMView * self)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
return WDOperationCopy;
}
static Bool acceptDropOperation(WMView * self, WMDragOperationType operation)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
return (operation == WDOperationCopy);
}
@@ -292,6 +298,9 @@ static WMData *fetchDragData(WMView * self, char *type)
char *color = WMGetColorRGBDescription(((WMColorWell *)
self->self)->color);
WMData *data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) type;
+
data = WMCreateDataWithBytes(color, strlen(color) + 1);
wfree(color);
@@ -388,6 +397,9 @@ static WMArray *requiredDataTypes(WMView * self,
WMDragOperationType request, WM
static WMDragOperationType allowedOperation(WMView * self, WMDragOperationType
request, WMArray * sourceDataTypes)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
if (dropIsOk(request, sourceDataTypes))
return WDOperationCopy;
else
@@ -400,6 +412,10 @@ static void performDragOperation(WMView * self, WMArray *
dropData, WMArray * op
WMColor *color;
WMData *data;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) operations;
+ (void) dropLocation;
+
/* only one operation requested (WDOperationCopy) implies only one data
*/
data = (WMData *) WMGetFromArray(dropData, 0);
diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index cadc151..362cfc3 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -2703,11 +2703,17 @@ static WMArray *dropDataTypes(WMView * self)
static WMDragOperationType wantedDropOperation(WMView * self)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
return WDOperationCopy;
}
static Bool acceptDropOperation(WMView * self, WMDragOperationType
allowedOperation)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+
return (allowedOperation == WDOperationCopy);
}
@@ -2746,11 +2752,20 @@ static WMDragSourceProcs _DragSourceProcs = {
static WMArray *requiredDataTypes(WMView * self, WMDragOperationType request,
WMArray * sourceDataTypes)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) request;
+ (void) sourceDataTypes;
+
return ((Text *) self->self)->xdndDestinationTypes;
}
static WMDragOperationType allowedOperation(WMView * self, WMDragOperationType
request, WMArray * sourceDataTypes)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) self;
+ (void) request;
+ (void) sourceDataTypes;
+
return WDOperationCopy;
}
@@ -2761,6 +2776,10 @@ static void performDragOperation(WMView * self, WMArray
* dropData, WMArray * op
char *colorName;
WMColor *color;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) operations;
+ (void) dropLocation;
+
if (tPtr) {
/* only one required type, implies only one drop data */
http://repo.or.cz/w/wmaker-crm.git/commit/fed1bf4de34aecda481adfff9335929a301cc175
commit fed1bf4de34aecda481adfff9335929a301cc175
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:51 2013 +0200
WINGs: Marked args as unused for compiler in Notification callback code
The mechanism of Notifications in the WINGs toolkit is relying on
callbacks to dispatch notifications, which means having a fixed argument
list for the handling 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]>
diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c
index ab70dd2..78e5649 100644
--- a/WINGs/wcolorpanel.c
+++ b/WINGs/wcolorpanel.c
@@ -2321,6 +2321,9 @@ static void grayBrightnessTextFieldCallback(void
*observerData, WMNotification *
int value;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) notification;
+
value = atoi(WMGetTextFieldText(panel->grayBrightnessT));
if (value > 100)
value = 100;
@@ -2375,6 +2378,9 @@ static void rgbTextFieldCallback(void *observerData,
WMNotification * notificati
int n;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) notification;
+
value[0] = atoi(WMGetTextFieldText(panel->rgbRedT));
value[1] = atoi(WMGetTextFieldText(panel->rgbGreenT));
value[2] = atoi(WMGetTextFieldText(panel->rgbBlueT));
@@ -2449,6 +2455,9 @@ static void cmykTextFieldCallback(void *observerData,
WMNotification * notificat
double scale;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) notification;
+
value[0] = atoi(WMGetTextFieldText(panel->cmykCyanT));
value[1] = atoi(WMGetTextFieldText(panel->cmykMagentaT));
value[2] = atoi(WMGetTextFieldText(panel->cmykYellowT));
@@ -2534,6 +2543,9 @@ static void hsbTextFieldCallback(void *observerData,
WMNotification * notificati
int n;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) notification;
+
value[0] = atoi(WMGetTextFieldText(panel->hsbHueT));
value[1] = atoi(WMGetTextFieldText(panel->hsbSaturationT));
value[2] = atoi(WMGetTextFieldText(panel->hsbBrightnessT));
diff --git a/WINGs/wlist.c b/WINGs/wlist.c
index f15e900..6e69a34 100644
--- a/WINGs/wlist.c
+++ b/WINGs/wlist.c
@@ -92,6 +92,9 @@ static void updateDoubleBufferPixmap(WMList * lPtr)
static void realizeObserver(void *self, WMNotification * not)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) not;
+
updateDoubleBufferPixmap(self);
}
diff --git a/WINGs/wslider.c b/WINGs/wslider.c
index f1f43fb..839930e 100644
--- a/WINGs/wslider.c
+++ b/WINGs/wslider.c
@@ -49,6 +49,9 @@ static void makeKnobPixmap(Slider * sPtr);
static void realizeObserver(void *self, WMNotification * not)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) not;
+
makeKnobPixmap(self);
}
diff --git a/WINGs/wsplitview.c b/WINGs/wsplitview.c
index e1dcd81..38b2cb3 100644
--- a/WINGs/wsplitview.c
+++ b/WINGs/wsplitview.c
@@ -351,6 +351,9 @@ static void handleViewResized(void *self, WMNotification *
notification)
{
WMSplitView *sPtr = (WMSplitView *) self;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) notification;
+
#if 0
printf("---- (handleViewResized - 1) ----n");
dumpSubviews(sPtr);
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c
index 1b3baa5..be0fc41 100644
--- a/WINGs/wtextfield.c
+++ b/WINGs/wtextfield.c
@@ -307,6 +307,9 @@ static void selectionNotification(void *observerData,
WMNotification * notificat
static void realizeObserver(void *self, WMNotification * not)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) not;
+
W_CreateIC(((TextField *) self)->view);
}
diff --git a/WINGs/wwindow.c b/WINGs/wwindow.c
index d3ad4aa..139cb53 100644
--- a/WINGs/wwindow.c
+++ b/WINGs/wwindow.c
@@ -95,6 +95,9 @@ static void realizeWindow(WMWindow * win);
static void realizeObserver(void *self, WMNotification * not)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) not;
+
realizeWindow(self);
}
http://repo.or.cz/w/wmaker-crm.git/commit/58961dce72a9c257b8eb24ee781824af9ae9d284
commit 58961dce72a9c257b8eb24ee781824af9ae9d284
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:50 2013 +0200
WUtil: Removed unused argument in internal function
diff --git a/WINGs/menuparser.c b/WINGs/menuparser.c
index e812ba3..e4f616c 100644
--- a/WINGs/menuparser.c
+++ b/WINGs/menuparser.c
@@ -30,8 +30,7 @@
static WMenuParser menu_parser_create_new(const char *file_name, void *file,
const char *include_default_paths);
-static char *menu_parser_isolate_token(WMenuParser parser,
- WParserMacro *list_macros);
+static char *menu_parser_isolate_token(WMenuParser parser);
static void menu_parser_get_directive(WMenuParser parser);
static Bool menu_parser_include_file(WMenuParser parser);
static void menu_parser_condition_ifmacro(WMenuParser parser, Bool
check_exists);
@@ -179,7 +178,7 @@ read_next_line:
goto read_next_line;
/* Found a word */
- token = menu_parser_isolate_token(cur_parser,
top_parser->macros);
+ token = menu_parser_isolate_token(cur_parser);
switch (scanmode) {
case GET_TITLE:
*title = token;
@@ -299,7 +298,7 @@ found_end_of_comment:
/* read a token (non-spaces suite of characters)
* the result is wmalloc's, so it needs to be free'd */
-static char *menu_parser_isolate_token(WMenuParser parser, WParserMacro
*list_macros)
+static char *menu_parser_isolate_token(WMenuParser parser)
{
char buffer_token[sizeof(parser->line_buffer)];
char *token;
http://repo.or.cz/w/wmaker-crm.git/commit/2dd4a34961ddff2760de56612630cf1ac5a94ed4
commit 2dd4a34961ddff2760de56612630cf1ac5a94ed4
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:49 2013 +0200
WUtil: Marked args as unused for compiler in WUtil's API code
There is a function in WUtil's API that take a parameter for consistency
reason, but actually does not need the argument.
As it is a case we know about, this patch adds the appropriate stuff to
tell the compiler we are ok with this to avoid a false report.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/WINGs/bagtree.c b/WINGs/bagtree.c
index bf1ac48..25ac080 100644
--- a/WINGs/bagtree.c
+++ b/WINGs/bagtree.c
@@ -758,5 +758,8 @@ void *WMBagIteratorAtIndex(WMBag * self, int index,
WMBagIterator * ptr)
int WMBagIndexForIterator(WMBag * bag, WMBagIterator ptr)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) bag;
+
return ((W_Node *) ptr)->index;
}
http://repo.or.cz/w/wmaker-crm.git/commit/6dba612d58b2f48959a3a87528a3192e7f94f26c
commit 6dba612d58b2f48959a3a87528a3192e7f94f26c
Author: Christophe CURIS <[email protected]>
Date: Sat Oct 19 22:17:48 2013 +0200
WUtil: Marked args as unused for compiler in a callback functions
As callback have a fixed prototype, it can be 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]>
diff --git a/WINGs/menuparser_macros.c b/WINGs/menuparser_macros.c
index 511334f..2b093db 100644
--- a/WINGs/menuparser_macros.c
+++ b/WINGs/menuparser_macros.c
@@ -679,6 +679,9 @@ static void mpm_get_user_name(WParserMacro *this,
WMenuParser parser)
/* Number id of the user under which we are running */
static void mpm_get_user_id(WParserMacro *this, WMenuParser parser)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) parser;
+
if (this->value[0] != '0') return; // Already evaluated, re-use previous
snprintf((char *) this->value, sizeof(this->value), "%d", getuid() );
}
diff --git a/WINGs/proplist.c b/WINGs/proplist.c
index 49cc53f..beb209d 100644
--- a/WINGs/proplist.c
+++ b/WINGs/proplist.c
@@ -1766,6 +1766,10 @@ int wmkdirhier(const char *path)
static int wrmdirhier_fn(const char *path, const struct stat *st,
int type, struct FTW *ftw)
{
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) st;
+ (void) ftw;
+
switch(type) {
case FTW_D:
break;
diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c
index 2947331..160a08b 100644
--- a/WINGs/userdefaults.c
+++ b/WINGs/userdefaults.c
@@ -136,6 +136,9 @@ static void synchronizeUserDefaults(void *foo)
{
UserDefaults *database = sharedUserDefaults;
+ /* Parameter not used, but tell the compiler that it is ok */
+ (void) foo;
+
while (database) {
if (!database->dontSync)
WMSynchronizeUserDefaults(database);
-----------------------------------------------------------------------
Summary of changes:
WINGs/bagtree.c | 3 ++
WINGs/dragcommon.c | 3 ++
WINGs/dragdestination.c | 25 +++++++++++++++++++++++
WINGs/dragsource.c | 36 ++++++++++++++++++++++++++++++++++
WINGs/menuparser.c | 7 ++---
WINGs/menuparser_macros.c | 3 ++
WINGs/proplist.c | 4 +++
WINGs/selection.c | 4 +++
WINGs/userdefaults.c | 3 ++
WINGs/wbox.c | 3 ++
WINGs/wbrowser.c | 6 +++++
WINGs/wcolorpanel.c | 39 +++++++++++++++++++++++++++++++++++++
WINGs/wcolorwell.c | 22 +++++++++++++++++++++
WINGs/wfilepanel.c | 19 ++++++++++++++++++
WINGs/wfontpanel.c | 20 +++++++++++++++++++
WINGs/winputmethod.c | 7 ++++++
WINGs/wlist.c | 6 +++++
WINGs/wmenuitem.c | 3 ++
WINGs/wprogressindicator.c | 3 ++
WINGs/wruler.c | 3 ++
WINGs/wscroller.c | 3 ++
WINGs/wscrollview.c | 3 ++
WINGs/wslider.c | 6 +++++
WINGs/wsplitview.c | 3 ++
WINGs/wtabview.c | 3 ++
WINGs/wtext.c | 46 ++++++++++++++++++++++++++++++++++++++++++++
WINGs/wtextfield.c | 19 ++++++++++++++++++
WINGs/wwindow.c | 6 +++++
28 files changed, 304 insertions(+), 4 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].