1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Fix compiler warnings in dtsession

This commit is contained in:
Marcin Cieslak 2012-08-16 02:10:55 +02:00 committed by Jon Trulson
parent ce4004f86b
commit d8db13985c
15 changed files with 86 additions and 60 deletions

View file

@ -79,14 +79,14 @@ extern void _DtSimpleErrnoError(
#define DtProgName XeProgName #define DtProgName XeProgName
extern _DtPrintDefaultError( extern int _DtPrintDefaultError(
Display *dpy, Display *dpy,
XErrorEvent *event, XErrorEvent *event,
char *msg ); char *msg );
#define _DTPRINTDEFAULTERROR_BUFSIZE 1024 #define _DTPRINTDEFAULTERROR_BUFSIZE 1024
extern _DtPrintDefaultErrorSafe( extern int _DtPrintDefaultErrorSafe(
Display *dpy, Display *dpy,
XErrorEvent *event, XErrorEvent *event,
char *msg, char *msg,

View file

@ -58,6 +58,7 @@
#include <X11/extensions/scrnsaver.h> #include <X11/extensions/scrnsaver.h>
#endif /* USE_X11SSEXT */ #endif /* USE_X11SSEXT */
#include <Xm/Xm.h> #include <Xm/Xm.h>
#include <Dt/Dt.h>
#include <Dt/DtP.h> #include <Dt/DtP.h>
#include <Dt/Action.h> #include <Dt/Action.h>
#include <Dt/SessionM.h> #include <Dt/SessionM.h>

View file

@ -162,7 +162,7 @@ GetMemoryUtilization(void)
{ {
#if !defined(linux) #if !defined(linux)
static int init = 0; static int init = 0;
static kmem; static int kmem;
#if !defined(SVR4) && !defined(sco) && !defined(hpV4) && !defined(_POWER) && !defined (__osf__) && !defined(CSRG_BASED) #if !defined(SVR4) && !defined(sco) && !defined(hpV4) && !defined(_POWER) && !defined (__osf__) && !defined(CSRG_BASED)
extern void nlist(); extern void nlist();
#endif #endif

View file

@ -714,9 +714,9 @@ SetRestorePath(
*/ */
if(smGD.compatMode == True) if(smGD.compatMode == True)
{ {
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
smGD.sessionType = DEFAULT_SESSION; smGD.sessionType = DEFAULT_SESSION;
smGD.restoreSession = NULL; smGD.restoreSession = NULL;
return(0); return(0);
@ -836,7 +836,7 @@ SetSysDefaults( void )
*/ */
strcpy(smGD.resourcePath, ""); strcpy(smGD.resourcePath, "");
strcpy(smGD.clientPath, ""); strcpy(smGD.clientPath, "");
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
smGD.sessionType = DEFAULT_SESSION; smGD.sessionType = DEFAULT_SESSION;
smGD.restoreSession = (char *) SM_SYSTEM_DIRECTORY; smGD.restoreSession = (char *) SM_SYSTEM_DIRECTORY;
@ -845,7 +845,7 @@ SetSysDefaults( void )
{ {
strcat(smGD.clientPath, "/"); strcat(smGD.clientPath, "/");
strncat(smGD.clientPath, langSpec, MAXPATHLEN-2); strncat(smGD.clientPath, langSpec, MAXPATHLEN-2);
smGD.clientPath[MAXPATHLEN-1]; smGD.clientPath[MAXPATHLEN-1] = 0;
} }
strcat(smGD.clientPath, "/"); strcat(smGD.clientPath, "/");
@ -865,8 +865,8 @@ SetSysDefaults( void )
PrintErrnoError(DtError, GETMESSAGE(4, 2, PrintErrnoError(DtError, GETMESSAGE(4, 2,
"No defaults files exist. " "No defaults files exist. "
"No applications will be restarted.")); "No applications will be restarted."));
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
} }
else else
{ {
@ -881,8 +881,8 @@ SetSysDefaults( void )
PrintErrnoError(DtError, GETMESSAGE(4, 3, PrintErrnoError(DtError, GETMESSAGE(4, 3,
"No defaults files exist. " "No defaults files exist. "
"No applications will be restarted.")); "No applications will be restarted."));
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
} }
} }
} }
@ -934,13 +934,13 @@ SetResSet( void )
status = stat(smGD.resourcePath, &buf); status = stat(smGD.resourcePath, &buf);
if(status == -1) if(status == -1)
{ {
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
} }
status = stat(smGD.settingPath, &buf); status = stat(smGD.settingPath, &buf);
if(status == -1) if(status == -1)
{ {
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
} }
return(0); return(0);
} }
@ -1039,9 +1039,9 @@ SetSavePath(
if(smGD.savePath == NULL) if(smGD.savePath == NULL)
{ {
PrintErrnoError(DtError, smNLS.cantCreateDirsString); PrintErrnoError(DtError, smNLS.cantCreateDirsString);
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
return(-1); return(-1);
} }
@ -1123,9 +1123,9 @@ SetSavePath(
MoveDirectory(smGD.clientPath, smGD.etcPath, False); MoveDirectory(smGD.clientPath, smGD.etcPath, False);
} }
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
} }
else else
{ {
@ -1141,9 +1141,9 @@ SetSavePath(
if(status == -1) if(status == -1)
{ {
PrintErrnoError(DtError, smNLS.cantCreateDirsString); PrintErrnoError(DtError, smNLS.cantCreateDirsString);
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
return(-1); return(-1);
} }
chmod(smGD.clientPath, 0755); chmod(smGD.clientPath, 0755);
@ -1189,9 +1189,9 @@ SetSavePath(
if(status == -1) if(status == -1)
{ {
PrintErrnoError(DtError, smNLS.cantCreateDirsString); PrintErrnoError(DtError, smNLS.cantCreateDirsString);
smGD.clientPath[0] = NULL; smGD.clientPath[0] = 0;
smGD.settingPath[0] = NULL; smGD.settingPath[0] = 0;
smGD.resourcePath[0] = NULL; smGD.resourcePath[0] = 0;
return(-1); return(-1);
} }
chmod(smGD.clientPath, 0755); chmod(smGD.clientPath, 0755);
@ -1257,7 +1257,7 @@ SetFontSavePath(char *langPtr)
if(status == -1) if(status == -1)
{ {
PrintErrnoError(DtError, smNLS.cantCreateDirsString); PrintErrnoError(DtError, smNLS.cantCreateDirsString);
smGD.fontPath[0] = NULL; smGD.fontPath[0] = 0;
return(-1); return(-1);
} }
chmod(smGD.fontPath, 0755); chmod(smGD.fontPath, 0755);
@ -1275,7 +1275,7 @@ SetFontSavePath(char *langPtr)
if(status == -1) if(status == -1)
{ {
PrintErrnoError(DtError, smNLS.cantCreateDirsString); PrintErrnoError(DtError, smNLS.cantCreateDirsString);
smGD.fontPath[0] = NULL; smGD.fontPath[0] = 0;
return(-1); return(-1);
} }
chmod(smGD.fontPath, 0755); chmod(smGD.fontPath, 0755);

View file

@ -92,6 +92,7 @@
#endif #endif
#include "Sm.h" #include "Sm.h"
#include "SmGlobals.h"
#include "SmUI.h" #include "SmUI.h"
#include "SmError.h" #include "SmError.h"
#include "SmLock.h" #include "SmLock.h"

View file

@ -69,6 +69,7 @@
#include <Dt/UserMsg.h> #include <Dt/UserMsg.h>
#include <Dt/EnvControlP.h> #include <Dt/EnvControlP.h>
#include <Dt/DtP.h> #include <Dt/DtP.h>
#include <Dt/Lock.h>
#include "Sm.h" #include "Sm.h"
#include "SmError.h" #include "SmError.h"
#include "SmGlobals.h" #include "SmGlobals.h"

View file

@ -33,6 +33,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <X11/Intrinsic.h> #include <X11/Intrinsic.h>
#include <X11/SM/SMlib.h> #include <X11/SM/SMlib.h>
#include "SmXSMP.h" #include "SmXSMP.h"

View file

@ -67,6 +67,7 @@
#include <X11/apollosys.h> /* for pid_t struct in hp-ux sys/types.h */ #include <X11/apollosys.h> /* for pid_t struct in hp-ux sys/types.h */
#endif #endif
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/wait.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netdb.h> #include <netdb.h>
#include <errno.h> #include <errno.h>
@ -96,6 +97,7 @@
#include <Dt/MsgLog.h> #include <Dt/MsgLog.h>
#include <bms/spc.h> #include <bms/spc.h>
#include <Dt/CmdInv.h> #include <Dt/CmdInv.h>
#include <Dt/ActionUtilP.h>
#include "Sm.h" #include "Sm.h"
#include "SmResource.h" #include "SmResource.h"
@ -334,6 +336,8 @@ static void RemoteRequestSucceeded(char *, void *);
static void SetTemporaryDisplay ( static void SetTemporaryDisplay (
int screenNum); int screenNum);
int RestorePreferences(char *filename);
static void RestoreDisplay ( static void RestoreDisplay (
int screenNum); int screenNum);
@ -650,7 +654,7 @@ StartWM( void )
Boolean goodWmStartup = True; Boolean goodWmStartup = True;
int status; int status;
if((smGD.wmStartup == NULL) || (*smGD.wmStartup == NULL)) if((smGD.wmStartup == NULL) || (*smGD.wmStartup == 0))
{ {
ForkWM(); ForkWM();
} }
@ -1105,7 +1109,7 @@ RestoreSettings( void )
/* /*
* Load the resources from the SM database file * Load the resources from the SM database file
*/ */
if (smGD.settingPath[0] != NULL) if (smGD.settingPath[0] != 0)
{ {
smBase = XrmGetFileDatabase(smGD.settingPath); smBase = XrmGetFileDatabase(smGD.settingPath);
@ -1565,7 +1569,7 @@ RestoreIndependentResources( void )
Boolean resIndep = False, resRet; Boolean resIndep = False, resRet;
char *resdata; char *resdata;
if(((smGD.sessionLang == NULL) || (*smGD.sessionLang == NULL)) && if(((smGD.sessionLang == NULL) || (*smGD.sessionLang == 0)) &&
(smRes.displayResolution == 0)) (smRes.displayResolution == 0))
{ {
/* /*
@ -2441,12 +2445,12 @@ GetNextLine( void )
{ {
string = (unsigned char *) fgets((char *)line, fileSize, cfileP); string = (unsigned char *) fgets((char *)line, fileSize, cfileP);
} }
else if ((parseP != NULL) && (*parseP != NULL)) else if ((parseP != NULL) && (*parseP != 0))
/* read parse string */ /* read parse string */
{ {
string = line; string = line;
#ifdef MULTIBYTE #ifdef MULTIBYTE
while ((*parseP != NULL) && while ((*parseP != 0) &&
((chlen = mblen ((char *) parseP, MB_CUR_MAX)) > 0) && ((chlen = mblen ((char *) parseP, MB_CUR_MAX)) > 0) &&
(*parseP != '\n')) (*parseP != '\n'))
/* copy all but NULL and newlines to line buffer */ /* copy all but NULL and newlines to line buffer */
@ -2463,7 +2467,7 @@ GetNextLine( void )
*(string++) = *(parseP++); *(string++) = *(parseP++);
} }
#endif #endif
*string = NULL; *string = 0;
if (*parseP == '\n') if (*parseP == '\n')
{ {
parseP++; parseP++;
@ -2803,7 +2807,7 @@ GetSmartString(
lnwsP++; lnwsP++;
if (lnwsP < endP) if (lnwsP < endP)
{ {
*lnwsP = NULL; *lnwsP = 0;
} }
} }
@ -2867,9 +2871,9 @@ GetSmartString(
* NULL -> point to NULL * NULL -> point to NULL
*/ */
if (*endP != NULL) if (*endP != 0)
{ {
*endP = NULL; /* write NULL over terminator */ *endP = 0; /* write NULL over terminator */
*linePP = ++curP; /* point beyond terminator */ *linePP = ++curP; /* point beyond terminator */
} }
else else
@ -3589,7 +3593,7 @@ StartLocalClient (
else else
tmpEnv = envp; tmpEnv = envp;
for (ppchar = tmpEnv; ppchar && *ppchar; *ppchar++) for (ppchar = tmpEnv; ppchar && *ppchar; ppchar++)
putenv (strdup (*ppchar)); putenv (strdup (*ppchar));
} }
@ -4089,14 +4093,14 @@ FixEnvironmentData( void )
int i; int i;
extern char **environ; /* MODIFIED - DISPLAY is remove if found. */ extern char **environ; /* MODIFIED - DISPLAY is remove if found. */
for (i=0, ppchar = environ; *ppchar; *ppchar++, i++) for (i=0, ppchar = environ; *ppchar; ppchar++, i++)
{ {
if ((strncmp (*ppchar, DISPLAY_NAME_EQUAL, strlen(DISPLAY_NAME_EQUAL))) == 0) if ((strncmp (*ppchar, DISPLAY_NAME_EQUAL, strlen(DISPLAY_NAME_EQUAL))) == 0)
{ {
/* /*
* Change the DISPLAY environment variable. * Change the DISPLAY environment variable.
*/ */
for (; *ppchar; *ppchar++, i++) for (; *ppchar; ppchar++, i++)
{ {
environ[i]=environ[i+1]; environ[i]=environ[i+1];
} }
@ -4754,7 +4758,7 @@ char ** RemoveEnvironmentVars (
if (!envp) if (!envp)
return (NULL); return (NULL);
for (count = 0, ppchar = envp; ppchar && *ppchar; count++, *ppchar++) ; for (count = 0, ppchar = envp; ppchar && *ppchar; count++, ppchar++) ;
retEnv = (char **) XtMalloc ((count + 1) * sizeof (char *)); retEnv = (char **) XtMalloc ((count + 1) * sizeof (char *));
if (!retEnv) if (!retEnv)
@ -4762,7 +4766,7 @@ char ** RemoveEnvironmentVars (
if (!ignoreEnvPtr) { if (!ignoreEnvPtr) {
for (count = 0, ppchar = envp; ppchar && *ppchar; for (count = 0, ppchar = envp; ppchar && *ppchar;
count++, *ppchar++) { count++, ppchar++) {
retEnv[count] = *ppchar; retEnv[count] = *ppchar;
} }
retEnv[count] = NULL; retEnv[count] = NULL;
@ -4770,11 +4774,11 @@ char ** RemoveEnvironmentVars (
return (retEnv); return (retEnv);
} }
for (count = 0, ppchar = envp; ppchar && *ppchar; *ppchar++) { for (count = 0, ppchar = envp; ppchar && *ppchar; ppchar++) {
found = False; found = False;
for (ppchar2 = ignoreEnvPtr; ppchar2 && *ppchar2; *ppchar2++) { for (ppchar2 = ignoreEnvPtr; ppchar2 && *ppchar2; ppchar2++) {
if ((!strncmp (*ppchar, *ppchar2, strlen (*ppchar2))) && if ((!strncmp (*ppchar, *ppchar2, strlen (*ppchar2))) &&
(((*ppchar)[strlen(*ppchar2)]) == '=')) { (((*ppchar)[strlen(*ppchar2)]) == '=')) {

View file

@ -76,6 +76,7 @@ extern int RestoreState( void ) ;
extern int SetCompatState( void ) ; extern int SetCompatState( void ) ;
extern int StartWM( void ) ; extern int StartWM( void ) ;
extern int RestoreResources(Boolean, ...) ; extern int RestoreResources(Boolean, ...) ;
extern int RestorePreferences(char *) ;
extern void RestoreIndependentResources(void) ; extern void RestoreIndependentResources(void) ;
extern void StartEtc( Boolean ) ; extern void StartEtc( Boolean ) ;
extern void CreateExecString(char *) ; extern void CreateExecString(char *) ;

View file

@ -88,6 +88,8 @@
#include "SmDB.h" #include "SmDB.h"
#include "SmProperty.h" #include "SmProperty.h"
#include "SmProp.h" #include "SmProp.h"
#include "Srv.h"
#include "SrvFile_io.h"
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include <stdlib.h> #include <stdlib.h>
@ -359,7 +361,7 @@ CompleteSave ( )
* CALLED - SETTINGS MUST BE SAVED BEFORE RESOURCES BECAUSE SETTINGS * CALLED - SETTINGS MUST BE SAVED BEFORE RESOURCES BECAUSE SETTINGS
* GETS INFORMATION SAVED IN RESOURCES (smToSet.dClickBuf) * GETS INFORMATION SAVED IN RESOURCES (smToSet.dClickBuf)
*/ */
smToSet.dClickBuf[0] = NULL; smToSet.dClickBuf[0] = 0;
/* /*
* Do the actual output of the X settings information. Output will * Do the actual output of the X settings information. Output will
@ -1607,9 +1609,9 @@ OutputResource( void )
/* /*
* Write out the LANG variable and the screen's Y resolution * Write out the LANG variable and the screen's Y resolution
*/ */
*resSpec = NULL; *resSpec = 0;
langPtr = getenv("LANG"); langPtr = getenv("LANG");
if((langPtr != NULL) && (*langPtr != NULL)) if((langPtr != NULL) && (*langPtr != 0))
{ {
sprintf(resSpec, "%s*%s: %s\n", SM_RESOURCE_NAME, SmNsessionLang, sprintf(resSpec, "%s*%s: %s\n", SM_RESOURCE_NAME, SmNsessionLang,
langPtr); langPtr);
@ -1623,7 +1625,7 @@ OutputResource( void )
(float) DisplayHeightMM(smGD.display, 0)) * 1000; (float) DisplayHeightMM(smGD.display, 0)) * 1000;
intYRes = fltYRes; intYRes = fltYRes;
if(*resSpec == NULL) if(*resSpec == 0)
{ {
strcpy(resSpec, SM_RESOURCE_NAME); strcpy(resSpec, SM_RESOURCE_NAME);
} }
@ -1697,7 +1699,7 @@ OutputResource( void )
if (preeditBuf) XFree(preeditBuf); if (preeditBuf) XFree(preeditBuf);
} }
if((smCust.dClickChange == True) && (smToSet.dClickBuf[0] != NULL)) if((smCust.dClickChange == True) && (smToSet.dClickBuf[0] != 0))
{ {
_DtAddToResource(smGD.display, (char *)smToSet.dClickBuf); _DtAddToResource(smGD.display, (char *)smToSet.dClickBuf);
} }

View file

@ -51,6 +51,7 @@
#include <Dt/UserMsg.h> #include <Dt/UserMsg.h>
#include <Dt/SaverP.h> #include <Dt/SaverP.h>
#include "Sm.h" #include "Sm.h"
#include "SmCommun.h"
#include "SmUI.h" /* smDD.* */ #include "SmUI.h" /* smDD.* */
#include "SmError.h" #include "SmError.h"
#include "SmWindow.h" #include "SmWindow.h"

View file

@ -76,10 +76,13 @@
#include <Dt/SessionM.h> #include <Dt/SessionM.h>
#include <Dt/Icon.h> #include <Dt/Icon.h>
#include <Dt/MsgLog.h> #include <Dt/MsgLog.h>
#include <Dt/Lock.h>
#include <Tt/tttk.h>
#include "Sm.h" #include "Sm.h"
#include "SmUI.h" #include "SmUI.h"
#include "SmSave.h" #include "SmSave.h"
#include "SmRestore.h"
#include "SmHelp.h" #include "SmHelp.h"
#include "SmGlobals.h" #include "SmGlobals.h"
@ -1167,8 +1170,8 @@ ImmediateExit(
*/ */
if(smGD.bmsDead == False) if(smGD.bmsDead == False)
{ {
notice = (Tt_message) tttk_message_create( 0, TT_NOTICE, TT_SESSION, 0, notice = (Tt_message) tttk_message_create( NULL, TT_NOTICE, TT_SESSION, NULL,
"XSession_Ending", 0); "XSession_Ending", NULL);
tt_message_send( notice ); tt_message_send( notice );
tt_message_destroy( notice ); tt_message_destroy( notice );
} }
@ -1184,8 +1187,8 @@ ImmediateExit(
int sessionType = smGD.sessionType; int sessionType = smGD.sessionType;
XtIntervalId timerId; XtIntervalId timerId;
msg = (Tt_message) tttk_message_create( 0, TT_NOTICE, TT_SESSION, 0, msg = (Tt_message) tttk_message_create( NULL, TT_NOTICE, TT_SESSION, NULL,
"DtActivity_Beginning", 0 ); "DtActivity_Beginning", NULL );
tt_message_send( msg ); tt_message_send( msg );
tt_message_destroy( msg ); tt_message_destroy( msg );

View file

@ -57,6 +57,7 @@
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <Dt/UserMsg.h> #include <Dt/UserMsg.h>
#include <Dt/WsmP.h>
#include "Sm.h" #include "Sm.h"
#include "SmError.h" #include "SmError.h"
#include "SmWindow.h" #include "SmWindow.h"

View file

@ -78,7 +78,10 @@ extern struct _palette * GetPaletteDefinition(
Display *dpy, Display *dpy,
int screen_number, int screen_number,
char *palette) ; char *palette) ;
extern void SaveDefaultPalette(
Display *dpy,
char *dtPath,
int mode );
#endif /*_srvfile_h*/ #endif /*_srvfile_h*/
/* DON'T ADD ANYTHING AFTER THIS #endif */ /* DON'T ADD ANYTHING AFTER THIS #endif */

View file

@ -71,6 +71,8 @@ static char rcsid[] =
#ifdef sun #ifdef sun
#include "OWsync.h" #include "OWsync.h"
#else
#include <Dt/DtP.h>
#endif #endif
#define DEFAULT 4 #define DEFAULT 4
@ -345,7 +347,7 @@ _DtCacheProperties(
*(palette->converted + palette->converted_len) = XmPIXEL_SET_PROP_VERSION ; *(palette->converted + palette->converted_len) = XmPIXEL_SET_PROP_VERSION ;
palette->converted_len++ ; palette->converted_len++ ;
palette->converted[palette->converted_len] = NULL ; palette->converted[palette->converted_len] = 0 ;
XChangeProperty(dpy, win, pixel_set_atom, XA_STRING, 8, PropModeAppend, XChangeProperty(dpy, win, pixel_set_atom, XA_STRING, 8, PropModeAppend,
(unsigned char *) XtNewString(palette->converted), (unsigned char *) XtNewString(palette->converted),
palette->converted_len) ; palette->converted_len) ;
@ -796,7 +798,7 @@ lose_selection(
Widget w, Widget w,
Atom *selection ) Atom *selection )
{ {
char *tmpStr, *tmpStr2; char *tmpStr, *tmpStr2, *tmpStr3;
Atom pixel_set_atom ; Atom pixel_set_atom ;
pixel_set_atom = XInternAtom(XtDisplay(w), XmSPIXEL_SET_PROP, FALSE) ; pixel_set_atom = XInternAtom(XtDisplay(w), XmSPIXEL_SET_PROP, FALSE) ;
@ -804,8 +806,13 @@ lose_selection(
tmpStr = (char *)SRV_MALLOC(strlen(MSG2) + strlen(MSG2a) + 6); tmpStr = (char *)SRV_MALLOC(strlen(MSG2) + strlen(MSG2a) + 6);
tmpStr2 = (char *)SRV_MALLOC(strlen(MSG2) + 1); tmpStr2 = (char *)SRV_MALLOC(strlen(MSG2) + 1);
sprintf(tmpStr2,"%s", MSG2); if (selection != NULL) {
sprintf(tmpStr,"%s%s%s", tmpStr2, selection, MSG2a); tmpStr3 = XGetAtomName(XtDisplay(w), *selection);
} else {
tmpStr3 = NULL;
}
printf(tmpStr2,"%s", MSG2);
sprintf(tmpStr,"%s%s%s", tmpStr2, (tmpStr3 == NULL) ? "(null)" : tmpStr3, MSG2a);
_DtSimpleError(XmSCOLOR_SRV_NAME, DtWarning, NULL, tmpStr, NULL); _DtSimpleError(XmSCOLOR_SRV_NAME, DtWarning, NULL, tmpStr, NULL);
SRV_FREE(tmpStr); SRV_FREE(tmpStr);
SRV_FREE(tmpStr2); SRV_FREE(tmpStr2);
@ -932,9 +939,9 @@ FindMaximumDefault(
colorSrv.FgColor[screen_number] = WHITE; colorSrv.FgColor[screen_number] = WHITE;
return(4); return(4);
} }
/* should never get here */
return(0);
} }
/* should never get here */
return(0);
} }
/**************************************************************************** /****************************************************************************