ttsnoop: resolve some compiler warnings
authorPeter Howkins <flibble@users.sf.net>
Wed, 11 Apr 2018 22:37:34 +0000 (23:37 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 11 Apr 2018 22:37:34 +0000 (23:37 +0100)
cde/programs/ttsnoop/callbackChooser_stubs.C.src
cde/programs/ttsnoop/messageProps_stubs.C.src
cde/programs/ttsnoop/patternProps_stubs.C.src
cde/programs/ttsnoop/ttChooser_stubs.C.src

index 40852de6dfd5cc5335379c409e97477ae172301e..d5bff34cb24c8c1065dd902a3b0b45efa0da15be 100644 (file)
@@ -21,6 +21,7 @@
  *  ** DELETE THE GENERATED COMMENTS!                                 **
  */
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <Xm/Xm.h>
 #include "dtb_utils.h"
@@ -76,7 +77,7 @@ _DtTtMsgCbChooserSet(
                        instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin );
        }
        XtVaSetValues( instance->callbackChooser, XmNtitle, title, NULL );
-       XtPointer xtPtr = (XtPointer)isMessage;
+       XtPointer xtPtr = (XtPointer) (intptr_t) isMessage;
        XtVaSetValues( instance->callbackAddButton, XmNuserData, xtPtr, NULL );
        XtVaSetValues( instance->callbackAddCancelButton,
                       XmNuserData, entity, NULL );
index 213bbc49b2c361fc48b86b6a3d28a4c455739549..7baf32e71d5001daf6d8c9535306ebae1f089862 100644 (file)
@@ -21,6 +21,7 @@
  *  ** DELETE THE GENERATED COMMENTS!                                 **
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <Xm/Xm.h>
 #include "dtb_utils.h"
@@ -119,7 +120,7 @@ _DtTtMessageSetUpdating(
 )
 {
        tt_message_user_set( msg, (int) (long) _DtTtMessageUpdating,
-                            (void *)updating );
+                            (void *) (intptr_t)updating );
 }
 
 typedef enum {
index dd08b3b93deb601647930ca3d0c68daa861daffc..2936a004bfddb6768b55623416b22933176ffd61 100644 (file)
@@ -21,6 +21,7 @@
  *  ** DELETE THE GENERATED COMMENTS!                                 **
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <Xm/Xm.h>
 #include "dtb_utils.h"
@@ -82,7 +83,7 @@ _DtTtPatternSetUpdating(
 )
 {
        tt_pattern_user_set( pat, (int) (long) _DtTtPatternUpdating,
-                            (void *)updating );
+                            (void *) (intptr_t) updating );
 }
 
 void
index 5d0d98c4a4a7ab4911bf7a979e7c2a294b1cdd79..e8fe41c507c4d1e6cb0715ea33feb2fb0172d32a 100644 (file)
@@ -21,6 +21,7 @@
  *  ** DELETE THE GENERATED COMMENTS!                                 **
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <Xm/Xm.h>
 #include "dtb_utils.h"
@@ -403,7 +404,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           msg = (Tt_message)ival;
+           msg = (Tt_message) (intptr_t) ival;
            if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
                    return;
            }
@@ -438,7 +439,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           pat = (Tt_pattern)ival;
+           pat = (Tt_pattern) (intptr_t) ival;
            if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
                    return;
            }
@@ -472,7 +473,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           pats = (Tt_pattern *)ival;
+           pats = (Tt_pattern *) (intptr_t) ival;
            if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
                    return;
            }
@@ -498,7 +499,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           pats = (Tt_pattern *)ival;
+           pats = (Tt_pattern *) (intptr_t) ival;
            if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
                    return;
            }