Kill lots of warnings in DtSvc.
This commit is contained in:
committed by
Jon Trulson
parent
0d7568e843
commit
8f98ac92cd
@@ -97,7 +97,8 @@ static Bool myCheckClientEvent(Display *display, XEvent *event, char *args)
|
||||
/*
|
||||
* myDtChkpntMsgSend --- Helper function: Send a checkpoint message to the listener
|
||||
*/
|
||||
static myDtChkpntMsgSend(char *message, char *type)
|
||||
static int
|
||||
myDtChkpntMsgSend(char *message, char *type)
|
||||
{
|
||||
static long msgcount = 0; /* Running count of messages */
|
||||
static int propnum = 0; /* Which property are we using ? */
|
||||
@@ -210,6 +211,7 @@ static myDtChkpntMsgSend(char *message, char *type)
|
||||
/*
|
||||
* _DtPerfChkpntInit --- Initialize the checkpointing mechanism
|
||||
*/
|
||||
int
|
||||
_DtPerfChkpntInit(Display *display,
|
||||
Window parentwin,
|
||||
char *prog_name,
|
||||
@@ -300,6 +302,7 @@ _DtPerfChkpntInit(Display *display,
|
||||
/*
|
||||
* _DtPerfChkpntMsgSend --- Send a checkpoint message to the listener
|
||||
*/
|
||||
void
|
||||
_DtPerfChkpntMsgSend(char *message)
|
||||
{
|
||||
myDtChkpntMsgSend(message, DT_PERF_CHKPNT_MSG_CHKPNT);
|
||||
@@ -308,6 +311,7 @@ _DtPerfChkpntMsgSend(char *message)
|
||||
/*
|
||||
* myDtPerfChkpntEnd --- End the checkpointing message delivery
|
||||
*/
|
||||
int
|
||||
_DtPerfChkpntEnd()
|
||||
{
|
||||
myDtChkpntMsgSend("End checkpoint delivery", DT_PERF_CHKPNT_MSG_END);
|
||||
|
||||
@@ -57,6 +57,7 @@ static struct {
|
||||
} dtsvc_info;
|
||||
|
||||
/* _DtPerfChkpntListenInit(): Start the Checkpoint listener */
|
||||
int
|
||||
#ifdef _NOPROTO
|
||||
_DtPerfChkpntListenInit(display, parentwin)
|
||||
Display *display; /* Current display */
|
||||
|
||||
@@ -97,7 +97,7 @@ typedef union {
|
||||
*/
|
||||
|
||||
/* Initialize the checkpointing mechanism */
|
||||
extern _DtPerfChkpntInit(
|
||||
extern int _DtPerfChkpntInit(
|
||||
Display *display, /* Display pointer */
|
||||
Window parentwin, /* Parent window id */
|
||||
char *prog_name, /* Name of the client program (argv[0]) */
|
||||
@@ -105,12 +105,12 @@ extern _DtPerfChkpntInit(
|
||||
);
|
||||
|
||||
/* Send a checkpoint message to the listener */
|
||||
extern _DtPerfChkpntMsgSend(
|
||||
extern void _DtPerfChkpntMsgSend(
|
||||
char *message /* Acual message for transmission */
|
||||
);
|
||||
|
||||
/* End the checkpointing message delivery */
|
||||
extern _DtPerfChkpntEnd(
|
||||
extern int _DtPerfChkpntEnd(
|
||||
);
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -118,7 +118,7 @@ extern _DtPerfChkpntEnd(
|
||||
/*************************************************************************/
|
||||
|
||||
/* Initialize the listener */
|
||||
extern _DtPerfChkpntListenInit(
|
||||
extern int _DtPerfChkpntListenInit(
|
||||
Display *display, /* Current display */
|
||||
Window parentwin /* Parent of window associated with listener */
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
@@ -1001,7 +1001,7 @@ static void _DtEnvMapIt(
|
||||
/*
|
||||
* Tear apart and check for so called substitution characters.
|
||||
*/
|
||||
if ( tmpPtr = DtStrchr(prePend, '%') ) {
|
||||
if (( tmpPtr = DtStrchr(prePend, '%') )) {
|
||||
/*
|
||||
* Temporarly shorten path up to substitution character.
|
||||
*/
|
||||
@@ -1341,7 +1341,7 @@ void _DtEnvMapForRemote (char *targetHost)
|
||||
*/
|
||||
cacheRegen = 0;
|
||||
for ( i = 0; i < targetCache->mapListCnt; i++ ) {
|
||||
if ( tmpPtr = getenv(targetCache->mapList[i]) ) {
|
||||
if (( tmpPtr = getenv(targetCache->mapList[i]) )) {
|
||||
if ( strcmp( tmpPtr,
|
||||
targetCache->mapListDetails[i].localEnvVarCopy) ) {
|
||||
cacheRegen = 1; /* one map entry is no longer valid */
|
||||
@@ -1402,8 +1402,8 @@ void _DtEnvMapForRemote (char *targetHost)
|
||||
* the restoration pointers.
|
||||
*/
|
||||
for ( i = 0; i < targetCache->mapListCnt; i++ ) {
|
||||
if ( targetCache->mapListDetails[i].localEnvVarPtr =
|
||||
getenv( targetCache->mapList[i] ) ) {
|
||||
if (( targetCache->mapListDetails[i].localEnvVarPtr =
|
||||
getenv( targetCache->mapList[i] ) )) {
|
||||
targetCache->mapListDetails[i].localEnvVarPtr -=
|
||||
strlen( targetCache->mapList[i] ) + 1;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <Dt/DtNlUtils.h>
|
||||
#include "DtSvcLock.h"
|
||||
|
||||
@@ -423,13 +423,13 @@ _DtEnvControl(
|
||||
|
||||
_postDtEnvironment.binPath = XtMalloc(bytes_needed);
|
||||
#ifdef sun
|
||||
if (ptr = strstr(tempString, "/usr/openwin/bin"))
|
||||
if ((ptr = strstr(tempString, "/usr/openwin/bin")))
|
||||
#elif defined(CSRG_BASED)
|
||||
if (ptr = strstr(tempString, "/usr/X11R6/bin"))
|
||||
if ((ptr = strstr(tempString, "/usr/X11R6/bin")))
|
||||
#elif defined(linux)
|
||||
if (ptr = strstr(tempString, "/usr/bin"))
|
||||
if ((ptr = strstr(tempString, "/usr/bin")))
|
||||
#else
|
||||
if (ptr = strstr(tempString, "/usr/bin/X11"))
|
||||
if ((ptr = strstr(tempString, "/usr/bin/X11")))
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -119,7 +119,7 @@ GetTableIndex(
|
||||
|
||||
if (tab->keyIsString) {
|
||||
s1 = (String)key;
|
||||
for (s2 = (char *)s1; c = *s2++; )
|
||||
for (s2 = (char *)s1; (c = *s2++); )
|
||||
sig = (sig << 1) + c;
|
||||
len = s2 - s1 - 1;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ GetTableIndex(
|
||||
sig = (Signature)key;
|
||||
|
||||
idx = HASH(tab, sig);
|
||||
while (entry = entries[idx]) {
|
||||
while ((entry = entries[idx])) {
|
||||
if (entries[idx] == &DtHashfake) {
|
||||
if (new)
|
||||
return idx;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <nl_types.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <Dt/MsgCatP.h>
|
||||
#include <DtSvcLock.h>
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xlibint.h>
|
||||
|
||||
#include <Dt/UserMsg.h>
|
||||
|
||||
int
|
||||
_DtPrintDefaultError(
|
||||
Display *dpy,
|
||||
@@ -52,6 +54,7 @@ _DtPrintDefaultError(
|
||||
char *msg )
|
||||
{
|
||||
_DtPrintDefaultErrorSafe(dpy, event, msg, BUFSIZ);
|
||||
/* XXX retval? */
|
||||
}
|
||||
|
||||
#define _DTP_STRNCAT(s1, s2, nb, ec) \
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
@@ -262,9 +263,9 @@ GetShortHostname(
|
||||
char * ptr;
|
||||
int status;
|
||||
|
||||
if (status = gethostname(buffer, bufsize))
|
||||
if ((status = gethostname(buffer, bufsize)))
|
||||
return status; /* failed gethostname */
|
||||
if (ptr = strstr(buffer, (char *)"."))
|
||||
if ((ptr = strstr(buffer, (char *)".")))
|
||||
*ptr = '\0'; /* delete domain name if there is one */
|
||||
return 0;
|
||||
}
|
||||
@@ -332,10 +333,10 @@ GetDisplayName (
|
||||
/*
|
||||
* Strip host name to nothing but the unqualified (short) host name
|
||||
*/
|
||||
if (pch = DtStrchr(hostName, ':'))
|
||||
if ((pch = DtStrchr(hostName, ':')))
|
||||
*pch = '\0';
|
||||
|
||||
if (pch = DtStrchr(hostName, '.'))
|
||||
if ((pch = DtStrchr(hostName, '.')))
|
||||
*pch = '\0';
|
||||
|
||||
if((!strcmp(hostName, "unix")) || (!strcmp(hostName, "local"))
|
||||
@@ -350,8 +351,8 @@ GetDisplayName (
|
||||
/*
|
||||
* Strip screen off of display name
|
||||
*/
|
||||
if (tmpNumber = DtStrchr(displayName, ':'))
|
||||
if (pch = DtStrchr(tmpNumber, '.'))
|
||||
if ((tmpNumber = DtStrchr(displayName, ':')))
|
||||
if ((pch = DtStrchr(tmpNumber, '.')))
|
||||
*pch = '\0';
|
||||
|
||||
/*
|
||||
|
||||
@@ -125,7 +125,7 @@ _DtVectorizeInPlace(
|
||||
vector. There is one more element than separator characters. */
|
||||
num_pieces = 1;
|
||||
nextc = string;
|
||||
while (nextc = DtStrchr(nextc, separator))
|
||||
while ((nextc = DtStrchr(nextc, separator)))
|
||||
{
|
||||
num_pieces++;
|
||||
nextc++;
|
||||
@@ -140,7 +140,7 @@ _DtVectorizeInPlace(
|
||||
nextc = string;
|
||||
|
||||
/* Parse out each component, terminating it with a NULL */
|
||||
while (nextc = DtStrchr(nextc, separator))
|
||||
while ((nextc = DtStrchr(nextc, separator)))
|
||||
{
|
||||
*nextc = '\0';
|
||||
nextc++;
|
||||
|
||||
@@ -35,9 +35,11 @@ $END$
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#if defined(sun)
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
#include <Xm/XmP.h>
|
||||
#include <Xm/IconFile.h>
|
||||
#include <Xm/XmPrivate.h>
|
||||
|
||||
#ifdef DtUse_XmFunctions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user