From: Peter Howkins Date: Wed, 7 Jan 2015 14:19:38 +0000 (+0000) Subject: dticon: resolve 3 compiler warnings X-Git-Tag: 2.2.3~47 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=561d85814085388aef399d2a4a32e0a0f27aea11;p=oweals%2Fcde.git dticon: resolve 3 compiler warnings --- diff --git a/cde/programs/dticon/help.c b/cde/programs/dticon/help.c index b27c8088..525a1689 100644 --- a/cde/programs/dticon/help.c +++ b/cde/programs/dticon/help.c @@ -59,6 +59,7 @@ ** ******************************************************************************/ #include +#include #include #include #include @@ -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) diff --git a/cde/programs/dticon/main.c b/cde/programs/dticon/main.c index 83edad52..3d458881 100644 --- a/cde/programs/dticon/main.c +++ b/cde/programs/dticon/main.c @@ -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 diff --git a/cde/programs/dticon/utils.c b/cde/programs/dticon/utils.c index 30345291..dd689f94 100644 --- a/cde/programs/dticon/utils.c +++ b/cde/programs/dticon/utils.c @@ -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;