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

dtlogin: resolve 8 compiler warnings.

This commit is contained in:
Peter Howkins 2014-12-27 20:56:29 +00:00
parent 61e925f3c5
commit c768260785
4 changed files with 14 additions and 17 deletions

View file

@ -222,9 +222,9 @@ PingHosts (XtPointer closure, XtIntervalId *id)
for (hosts = hostAddrdb; hosts; hosts = hosts->next)
{
if (hosts->type == QUERY)
XdmcpFlush (socketFD, &directBuffer, hosts->addr, hosts->addrlen);
XdmcpFlush (socketFD, &directBuffer, (XdmcpNetaddr) hosts->addr, hosts->addrlen);
else
XdmcpFlush (socketFD, &broadcastBuffer, hosts->addr, hosts->addrlen);
XdmcpFlush (socketFD, &broadcastBuffer, (XdmcpNetaddr) hosts->addr, hosts->addrlen);
}
if (++pingTry < TRIES)
XtAddTimeOut (PING_INTERVAL, PingHosts, (XtPointer) 0);
@ -501,7 +501,7 @@ ReceivePacket (XtPointer closure, int *source, XtInputId *id)
int addrlen;
addrlen = sizeof (addr);
if (!XdmcpFill (socketFD, &buffer, &addr, &addrlen))
if (!XdmcpFill (socketFD, &buffer, (XdmcpNetaddr) &addr, &addrlen))
return;
if (!XdmcpReadHeader (&buffer, &header))
return;

View file

@ -93,9 +93,7 @@ static char * makeEnv(
static SIGVAL MakeLangAbort(
int arg );
static int MatchesFileSuffix(
char * filename,
char * suffix );
static int MatchesFileSuffix(const char *filename, const char *suffix);
static void ScanNLSDir(
char * dirname );
@ -676,23 +674,22 @@ MakeLangList( void )
static int
MatchesFileSuffix(char *filename, char *suffix)
MatchesFileSuffix(const char *filename, const char *suffix)
{
int retval = 0;
#if defined(_AIX) || defined(SVR4) || defined (__osf__) || defined(linux) || \
defined(CSRG_BASED)
char *pch;
int different = 1;
/*
* The assumption here is that the use of strrstr is
* to determine if "dp->d_name" ends in ".cat".
*/
pch = filename;
if ((int) strlen(filename) >= (int) strlen(suffix))
pch = (char *)
strcmp(filename + (strlen(filename) - strlen (suffix)), suffix);
if (strlen(filename) >= strlen(suffix)) {
different = strcmp(filename + (strlen(filename) - strlen (suffix)), suffix);
}
return (pch == NULL);
return (different == 0);
#else
return (strrstr(filename, suffix) != NULL);
#endif

View file

@ -794,7 +794,7 @@ MenuItemCB( Widget w, XtPointer client_data, XtPointer call_data )
session_selected = True;
switch ( (int) client_data) {
switch ( (long) client_data) {
case OB_RESTART_SERVER:
CleanupAndExit(NULL, NOTIFY_RESTART);

View file

@ -774,7 +774,7 @@ OpenCatalog()
if (NULL != langenv)
{
nl_fd = catopen(NLS_CATALOG, NL_CAT_LOCALE);
if (0 > (int) nl_fd)
if (0 > (long) nl_fd)
LogError((unsigned char*) MC_DEF_LOG_NO_MSGCAT, langenv);
}
}
@ -791,7 +791,7 @@ unsigned char *
ReadCatalog(int setn, int msgn, char *dflt)
{
OpenCatalog();
if ((0 > (int) nl_fd) || (NULL == langenv))
if ((0 > (long) nl_fd) || (NULL == langenv))
return (unsigned char*) dflt;
else
return (unsigned char*) catgets(nl_fd, setn, msgn, dflt);
@ -808,7 +808,7 @@ XmString
ReadCatalogXms(int setn, int msgn, char *dflt)
{
OpenCatalog();
if (0 > (int) nl_fd)
if (0 > (long) nl_fd)
return XmStringCreateLocalized(dflt);
else
return XmStringCreateLocalized((char*) ReadCatalog(setn, msgn, dflt));