From: alx Date: Thu, 23 Jul 2015 18:51:47 +0000 (+0200) Subject: DtWidget: resolved some compiler warnings X-Git-Tag: 2.2.4~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ae16363537d037ee056b23bb032d30a59e53f943;p=oweals%2Fcde.git DtWidget: resolved some compiler warnings --- diff --git a/cde/lib/DtWidget/ComboBox.c b/cde/lib/DtWidget/ComboBox.c index 3369adc7..7aa63e59 100644 --- a/cde/lib/DtWidget/ComboBox.c +++ b/cde/lib/DtWidget/ComboBox.c @@ -117,6 +117,9 @@ express or implied warranty. /* some unpublished Motif interfaces */ #include +/* From MenuUtilP.h */ +extern int _XmGrabKeyboard(Widget widget, int owner_events, int pointer_mode, + int keyboard_mode, Time time) ; /* * MotifBc */ @@ -2286,7 +2289,7 @@ list_event_handler( Widget widget, if ( ShellPoppedUp(((ShellWidget)(Shell(combo_w)))) ) { _XmGrabKeyboard(widget, False, GrabModeAsync, GrabModeAsync, CurrentTime); - XtSetKeyboardFocus(List(combo_w), RevertToNone); + XtSetKeyboardFocus(List(combo_w), None); } break; case EnterNotify: diff --git a/cde/lib/DtWidget/DialogBox.c b/cde/lib/DtWidget/DialogBox.c index c7fc363f..40ceb736 100644 --- a/cde/lib/DtWidget/DialogBox.c +++ b/cde/lib/DtWidget/DialogBox.c @@ -784,7 +784,7 @@ CreateChildren( XtManageChild (btn); XtAddCallback (btn, XmNactivateCallback, (XtCallbackProc)ButtonCallback, - (XtPointer)(i+1)); + (XtPointer)((long)(i+1))); button[i] = btn; l_p += b_delta; diff --git a/cde/lib/DtWidget/Icon.c b/cde/lib/DtWidget/Icon.c index 400fe97e..b1287a1a 100644 --- a/cde/lib/DtWidget/Icon.c +++ b/cde/lib/DtWidget/Icon.c @@ -85,6 +85,10 @@ extern void _DtRegisterNewConverters ( void ); extern char * _XmExtObjAlloc(int size); extern void _XmExtObjFree(XtPointer element); extern void _XmSelectColorDefault ( Widget, int, XrmValue * ); +/* From XmP.h */ +extern void _XmExtImportArgs( Widget w, ArgList args, Cardinal *num_args); +/* From TravActI.h */ +extern void _XmEnterGadget( Widget wid, XEvent *event, String*,Cardinal*); #define SPACING_DEFAULT 2 #define MARGIN_DEFAULT 2 @@ -1860,10 +1864,10 @@ Initialize( { G_MarginWidth (new) = XmeToHorizontalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_MarginWidth (new)); + (XtArgVal *)((long)G_MarginWidth (new))); G_MarginHeight (new) = XmeToVerticalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_MarginHeight (new)); + (XtArgVal *)((long)G_MarginHeight (new))); } /* Check for unspecified margins. @@ -1887,9 +1891,9 @@ Initialize( (G_PixmapPosition (new) == XmPIXMAP_LEFT || G_PixmapPosition (new) == XmPIXMAP_RIGHT) ? XmeToHorizontalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_Spacing (new)) + (XtArgVal *)((long)G_Spacing (new))) : XmeToVerticalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_Spacing (new)); + (XtArgVal *)((long)G_Spacing (new))); } /* Set width and height. @@ -2402,10 +2406,10 @@ SetValues( { G_MarginWidth (new) = XmeToHorizontalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_MarginWidth (new)); + (XtArgVal *)((long)G_MarginWidth (new))); G_MarginHeight (new) = XmeToVerticalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_MarginHeight (new)); + (XtArgVal *)((long)G_MarginHeight (new))); } /* Convert spacing. @@ -2417,9 +2421,9 @@ SetValues( (G_PixmapPosition (new) == XmPIXMAP_LEFT || G_PixmapPosition (new) == XmPIXMAP_RIGHT) ? XmeToHorizontalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_Spacing (new)) + (XtArgVal *)((long)G_Spacing (new))) : XmeToVerticalPixels ((Widget)new, G_UnitType (new), - (XtArgVal *)G_Spacing (new)); + (XtArgVal *)((long)G_Spacing (new))); } /* Process change in string or font list. @@ -2771,18 +2775,15 @@ InputDispatch( IconDisarm (w, (XEvent*) event); } else if (event_mask & XmHELP_EVENT) - _XmSocorro (w, (XEvent *)event, - (String *)NULL,(Cardinal)0); + _XmSocorro (w, (XEvent *)event,NULL,NULL); else if (event_mask & XmENTER_EVENT) IconEnter (w, (XEvent *)event); else if (event_mask & XmLEAVE_EVENT) IconLeave (w, (XEvent *)event); else if (event_mask & XmFOCUS_IN_EVENT) - _XmFocusInGadget (w, (XEvent *)event, - (String *)NULL,(Cardinal)0); + _XmFocusInGadget (w, (XEvent *)event,NULL,NULL); else if (event_mask & XmFOCUS_OUT_EVENT) - _XmFocusOutGadget (w, (XEvent *)event, - (String *)NULL,(Cardinal)0); + _XmFocusOutGadget (w, (XEvent *)event,NULL,NULL); } @@ -3331,7 +3332,7 @@ Draw( /* Draw shadow. */ - if (G_ShadowThickness (g) > 0 && G_DrawShadow(g)) + if (G_ShadowThickness (g) > 0 && G_DrawShadow(g)){ if(G_BorderType(g) == DtRECTANGLE || !G_Pixmap(g)) { unsigned char shadow_type; @@ -3358,6 +3359,7 @@ Draw( _DtProcessUnlock(); (*call_callback) (g, G_Callback (g), XmCR_SHADOW, NULL); } + } } diff --git a/cde/lib/DtWidget/MenuButton.c b/cde/lib/DtWidget/MenuButton.c index f30f002a..96fbbada 100644 --- a/cde/lib/DtWidget/MenuButton.c +++ b/cde/lib/DtWidget/MenuButton.c @@ -369,7 +369,7 @@ static void DrawMenuGlyph( DtMenuButtonWidget mb ) { - if ((MB_GLYPH_WIDTH(mb) != 0)) + if ((MB_GLYPH_WIDTH(mb) != 0)){ if(MB_PIXMAP(mb) != XmUNSPECIFIED_PIXMAP) XCopyArea (XtDisplay(mb), MB_PIXMAP(mb), @@ -378,7 +378,8 @@ DrawMenuGlyph( MB_GLYPH_WIDTH(mb), MB_GLYPH_HEIGHT(mb), MB_GLYPH_X(mb), MB_GLYPH_Y(mb)); else - DrawArrow((Widget)mb); + DrawArrow((Widget)mb); + } } /*