DtWidget: resolved some compiler warnings
authoralx <alx@fastestcode.org>
Thu, 23 Jul 2015 18:51:47 +0000 (20:51 +0200)
committerJon Trulson <jon@radscan.com>
Fri, 24 Jul 2015 00:51:48 +0000 (18:51 -0600)
cde/lib/DtWidget/ComboBox.c
cde/lib/DtWidget/DialogBox.c
cde/lib/DtWidget/Icon.c
cde/lib/DtWidget/MenuButton.c

index 3369adc7b487479af1c806b6d7cb4da486b66945..7aa63e5928479cccb8f2cf25e80915682b9e5e76 100644 (file)
@@ -117,6 +117,9 @@ express or implied warranty.
 /* some unpublished Motif interfaces */
 #include <Xm/XmPrivate.h>
 
+/* 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:
index c7fc363f595bc3da9975a5ec84413e95a3f65343..40ceb736edfd2fa31d7648fe84139cdcbf5a544f 100644 (file)
@@ -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;
index 400fe97ee390242f871a5ce617d2ae8b2070f390..b1287a1a7df968cdaf38cd19598dc3b24342809f 100644 (file)
@@ -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);
             }
+       }
 }
 
 
index f30f002a9918f5128c6431b14d68719ec52d2508..96fbbadac6d8d9fd8d6076580a9781d71390206b 100644 (file)
@@ -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);
+       }
 }
        
 /*