Kill lots of warnings in DtSvc.

This commit is contained in:
Pascal Stumpf
2013-07-21 22:55:09 +02:00
committed by Jon Trulson
parent 0d7568e843
commit 8f98ac92cd
42 changed files with 275 additions and 185 deletions

View File

@@ -63,6 +63,7 @@
#include <X11/Intrinsic.h>
#include <Dt/CmdInv.h>
#include <Dt/DtP.h>
#include <Dt/Dts.h>
#include <Dt/Help.h>
@@ -5138,7 +5139,7 @@ CmdInvSuccessfulRequest(
* its status via TT messaging OR it may already have exited.
* For now we set the state here -- till we find a better place.
*/
if (childrecp = _DtActFindChildRec(invp->id,data->requestPtr->childId))
if ((childrecp = _DtActFindChildRec(invp->id,data->requestPtr->childId)))
childrecp->childState = _DtActCHILD_ALIVE_UNKNOWN;
else
myassert(0 /* could not find child record */ );

View File

@@ -42,6 +42,7 @@
/*LINTLIBRARY*/
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <string.h>
#include <X11/Intrinsic.h>
@@ -176,41 +177,41 @@ typedef struct {
* along with the bitmask that represents the field.
*/
static _DtActNameAndBit _DtActNamesAndBits[] = {
_DtACTION_LABEL, _ActDb_LABEL_SET,
_DtACTION_TYPE, _ActDb_TYPE_SET,
_DtACTION_ARG_CLASS, _ActDb_ARG_CLASS_SET,
_DtACTION_ARG_MODE, _ActDb_ARG_MODE_SET,
_DtACTION_ARG_TYPE, _ActDb_ARG_TYPE_SET,
_DtACTION_ARG_COUNT, _ActDb_ARG_COUNT_SET,
_DtACTION_DESCRIPTION, _ActDb_DESCRIPTION_SET,
_DtACTION_ICON, _ActDb_ICON_SET,
{ _DtACTION_LABEL, _ActDb_LABEL_SET, },
{ _DtACTION_TYPE, _ActDb_TYPE_SET, },
{ _DtACTION_ARG_CLASS, _ActDb_ARG_CLASS_SET, },
{ _DtACTION_ARG_MODE, _ActDb_ARG_MODE_SET, },
{ _DtACTION_ARG_TYPE, _ActDb_ARG_TYPE_SET, },
{ _DtACTION_ARG_COUNT, _ActDb_ARG_COUNT_SET, },
{ _DtACTION_DESCRIPTION, _ActDb_DESCRIPTION_SET, },
{ _DtACTION_ICON, _ActDb_ICON_SET, },
/*******************************************************************
Meaningless for actions -- ignore these for now
_DtACTION_INSTANCE_ICON, _ActDb_INSTANCE_ICON_SET,
{ _DtACTION_INSTANCE_ICON, _ActDb_INSTANCE_ICON_SET, },
*******************************************************************/
_DtACTION_MAP_ACTION, _ActDb_MAP_ACTION_SET,
_DtACTION_EXEC_STRING, _ActDb_EXEC_STRING_SET,
_DtACTION_EXEC_HOST, _ActDb_EXEC_HOST_SET,
_DtACTION_CWD, _ActDb_CWD_SET,
_DtACTION_WINDOW_TYPE, _ActDb_WINDOW_TYPE_SET,
_DtACTION_TERM_OPTS, _ActDb_TERM_OPTS_SET,
_DtACTION_TT_CLASS, _ActDb_TT_CLASS_SET,
_DtACTION_TT_SCOPE, _ActDb_TT_SCOPE_SET,
_DtACTION_TT_OPERATION, _ActDb_TT_OPERATION_SET,
_DtACTION_TT_FILE, _ActDb_TT_FILE_SET,
_DtACTION_TTN_MODE, _ActDb_TT_ARGN_MODE_SET,
_DtACTION_TTN_VTYPE, _ActDb_TT_ARGN_VTYP_SET,
_DtACTION_TTN_REP_TYPE, _ActDb_TT_ARGN_RTYP_SET,
_DtACTION_TTN_VALUE, _ActDb_TT_ARGN_VAL_SET,
{ _DtACTION_MAP_ACTION, _ActDb_MAP_ACTION_SET, },
{ _DtACTION_EXEC_STRING, _ActDb_EXEC_STRING_SET, },
{ _DtACTION_EXEC_HOST, _ActDb_EXEC_HOST_SET, },
{ _DtACTION_CWD, _ActDb_CWD_SET, },
{ _DtACTION_WINDOW_TYPE, _ActDb_WINDOW_TYPE_SET, },
{ _DtACTION_TERM_OPTS, _ActDb_TERM_OPTS_SET, },
{ _DtACTION_TT_CLASS, _ActDb_TT_CLASS_SET, },
{ _DtACTION_TT_SCOPE, _ActDb_TT_SCOPE_SET, },
{ _DtACTION_TT_OPERATION, _ActDb_TT_OPERATION_SET, },
{ _DtACTION_TT_FILE, _ActDb_TT_FILE_SET, },
{ _DtACTION_TTN_MODE, _ActDb_TT_ARGN_MODE_SET, },
{ _DtACTION_TTN_VTYPE, _ActDb_TT_ARGN_VTYP_SET, },
{ _DtACTION_TTN_REP_TYPE, _ActDb_TT_ARGN_RTYP_SET, },
{ _DtACTION_TTN_VALUE, _ActDb_TT_ARGN_VAL_SET, },
#ifdef _DT_ALLOW_DT_MSGS
_DtACTION_DT_REQUEST_NAME, _ActDb_DT_REQ_NAME_SET,
_DtACTION_DT_SVC, _ActDb_DT_SVC_SET,
_DtACTION_DT_NOTIFY_NAME, _ActDb_DT_NTFY_NAME_SET,
_DtACTION_DT_NGROUP, _ActDb_DT_NGROUP_SET,
_DtPFX _DtACTION_DTN_VALUE, _ActDb_DT_ARGN_VAL_SET,
{ _DtACTION_DT_REQUEST_NAME, _ActDb_DT_REQ_NAME_SET, },
{ _DtACTION_DT_SVC, _ActDb_DT_SVC_SET, },
{ _DtACTION_DT_NOTIFY_NAME, _ActDb_DT_NTFY_NAME_SET, },
{ _DtACTION_DT_NGROUP, _ActDb_DT_NGROUP_SET, },
{ _DtPFX _DtACTION_DTN_VALUE, _ActDb_DT_ARGN_VAL_SET, },
#endif /* _DT_ALLOW_DT_MSGS */
NULL, 0
{ NULL, 0 },
};
#define NUM_FIELD_NAMES sizeof(_DtActNamesAndBits)/sizeof(_DtActNameAndBit) - 1

View File

@@ -1939,14 +1939,14 @@ ValidKeyword(
* Fill in the length of the keywords at compile time by
* using the "sizeof" operator (and subtracting one for the NULL).
*/
static localHostLen = sizeof(_DtACT_LOCALHOST_STR) - 1;
static databaseHostLen = sizeof(_DtACT_DATABASEHOST_STR) - 1;
static displayHostLen = sizeof(_DtACT_DISPLAYHOST_STR) - 1;
static sessionHostLen = sizeof(_DtACT_SESSIONHOST_STR) - 1;
static argsLen = sizeof(_DtACT_ARGS_STR) - 1;
static arg_Len = sizeof(_DtACT_ARG_UNDER_STR) - 1;
static stringQualifierLen = sizeof(_DtACT_STRING_QUALIFIER) - 1;
static fileQualifierLen = sizeof(_DtACT_FILE_QUALIFIER) - 1;
static int localHostLen = sizeof(_DtACT_LOCALHOST_STR) - 1;
static int databaseHostLen = sizeof(_DtACT_DATABASEHOST_STR) - 1;
static int displayHostLen = sizeof(_DtACT_DISPLAYHOST_STR) - 1;
static int sessionHostLen = sizeof(_DtACT_SESSIONHOST_STR) - 1;
static int argsLen = sizeof(_DtACT_ARGS_STR) - 1;
static int arg_Len = sizeof(_DtACT_ARG_UNDER_STR) - 1;
static int stringQualifierLen = sizeof(_DtACT_STRING_QUALIFIER) - 1;
static int fileQualifierLen = sizeof(_DtACT_FILE_QUALIFIER) - 1;
int len = end - start + 1;
char *stop;
char *lastCh;
@@ -2303,7 +2303,7 @@ ParseMessage(
while (1)
{
/* Look for the start and end of a keyword */
if (keywordStart = DtStrchr(start, '%'))
if ((keywordStart = DtStrchr(start, '%')))
keywordEnd = DtStrchr(keywordStart+1, '%');
else
keywordEnd = NULL;

View File

@@ -82,6 +82,7 @@
#include <Dt/DtNlUtils.h>
#include <Dt/CommandM.h>
#include <Dt/Utility.h>
#include <Dt/SvcTT.h>
#include <Dt/Service.h>
#include <Dt/ActionUtilP.h>

View File

@@ -38,6 +38,7 @@
************************************<+>*************************************/
/*LINTLIBRARY*/
#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
@@ -66,6 +67,7 @@
#include <Dt/ActionUtilP.h>
#include <Dt/CmdInvP.h>
#include <Dt/DtNlUtils.h>
#include <Dt/Indicator.h>
#include "myassertP.h"
#include "DtSvcLock.h"
@@ -354,7 +356,7 @@ _DtGetDisplayHostName( Display *dp)
*/
strcpy(tmpName,DisplayString(dp));
if ( tmp = DtStrrchr(tmpName,':') )
if (( tmp = DtStrrchr(tmpName,':') ))
{
*tmp = '\0';
displayHostName = XtNewString(tmpName);
@@ -368,7 +370,7 @@ _DtGetDisplayHostName( Display *dp)
* DISPLAY environment variable.
*/
strcpy(tmpName,getenv("DISPLAY"));
if ( tmp = DtStrrchr(tmpName,':') )
if (( tmp = DtStrrchr(tmpName,':') ))
{
*tmp = '\0';
displayHostName = XtNewString(tmpName);
@@ -423,7 +425,7 @@ _DtGetLocalHostName( void )
_DtSvcProcessUnlock();
return NULL; /* failed gethostname */
}
if (ptr = DtStrchr(hostNameBuf, '.'))
if ((ptr = DtStrchr(hostNameBuf, '.')))
*ptr = '\0'; /* delete domain name if there is one */
localHostName = hostNameBuf;
@@ -1872,6 +1874,7 @@ _DtActReadTmpFileToBuffer( char *fname, int *sizep )
*
*****************************************************************************/
int
_DtActGetCmdReturnArgs(
DtActionInvocationID invId,
_DtActChildRecT *childp,

View File

@@ -58,6 +58,7 @@
#include <Dt/CommandM.h>
#include <Dt/EnvControlP.h>
#include <Dt/DtNlUtils.h>
#include <Dt/Utility.h>
#include <Dt/ActionDb.h>
#include <Dt/ActionUtilP.h>

View File

@@ -189,7 +189,7 @@ _DtDbPathIdToString(
char * path;
char * newPath;
if (path = XrmQuarkToString((XrmQuark)pathId))
if ((path = XrmQuarkToString((XrmQuark)pathId)))
{
/* Allocate some storage for the string */
newPath = (char *) XtNewString(path);

View File

@@ -742,7 +742,7 @@ _DtDbGetDataBaseEnv( void )
* Get the DTDATABASESEARCHPATH environment variable. If it is not set,
* create the default value.
*/
if ( temp_s = getenv ("DTDATABASESEARCHPATH"))
if (( temp_s = getenv ("DTDATABASESEARCHPATH")))
if ( *temp_s != 0 ) return XtNewString(temp_s);
temp_buf =