dticon: resolve 3 compiler warnings
authorPeter Howkins <flibble@users.sf.net>
Wed, 7 Jan 2015 14:19:38 +0000 (14:19 +0000)
committerPeter Howkins <flibble@users.sf.net>
Wed, 7 Jan 2015 14:19:38 +0000 (14:19 +0000)
cde/programs/dticon/help.c
cde/programs/dticon/main.c
cde/programs/dticon/utils.c

index b27c80885c4fc0cc0a48df48622790bd860291e0..525a16897efdcfaa806bfd5a7101c8a61f8fe937 100644 (file)
@@ -59,6 +59,7 @@
  **
  ******************************************************************************/
 #include <stdio.h>
+#include <stdint.h>
 #include <Xm/DialogS.h>
 #include <Xm/Form.h>
 #include <Xm/MwmUtil.h>
@@ -332,7 +333,7 @@ HelpTriggerCB(
     stat_out("Entering HelpTriggerCB: help-tag=%d\n", (int) client_data);
 #endif
 
-  HelpSetVolAndLocation((int) client_data);
+  HelpSetVolAndLocation((int) (intptr_t) client_data);
 
 #ifdef DEBUG
   if (debug)
index 83edad52c46b90c43d22d2507fcf2c1ee263a4b2..3d4588812ccc13883c1919367208bf260253792c 100644 (file)
@@ -363,7 +363,7 @@ main(
 static void
 ExitCB (Widget dialog, XtPointer client_data, XtPointer call_data)
 {
-    exit((int) client_data);
+    exit((int) (intptr_t) client_data);
 }
 
 void
index 30345291977e751dc65556d1837c7198cfecd67c..dd689f9407a528bc9b6e42d1205d94cd7298f702 100644 (file)
@@ -2341,7 +2341,12 @@ SaveSession( void )
     if (last_fname[0] != '\0')
         sprintf(bufr, "%s*file: %s\n", bufr, last_fname);
 
-    write (fd, bufr, strlen(bufr));
+    if(-1 == write (fd, bufr, strlen(bufr))) {
+       fprintf(stderr, "write() to session failed\n");
+        XtFree ((char *)path);
+        XtFree ((char *)name);
+        return;    
+    }
 
 
     n = 0;