fix signed mismatch compiler diagnostic

r2427 | dcl | 2008-04-14 09:46:32 +1000 (Mon, 14 Apr 2008) | 2 lines
This commit is contained in:
Douglas Clowes
2008-04-14 09:46:32 +10:00
parent cc845c6723
commit d34b441f14
3 changed files with 10 additions and 8 deletions

View File

@@ -578,7 +578,7 @@ int SCWriteInContext(SConnection *pCon, char *pBuffer, int out, commandContext c
va_list ap; va_list ap;
char buf[256]; char buf[256];
char *dyn; char *dyn;
int l; unsigned int l;
int res; int res;
va_start(ap, fmt); va_start(ap, fmt);
@@ -1093,7 +1093,7 @@ pDynString SCEndBuffering(SConnection *pCon)
compStream.next_out = (Bytef *)outBuf; compStream.next_out = (Bytef *)outBuf;
compStream.avail_in = iDataLen; compStream.avail_in = iDataLen;
compStream.avail_out = 65536; compStream.avail_out = 65536;
while(compStream.total_in < iDataLen) while(compStream.total_in < (unsigned) iDataLen)
{ {
iRet = deflate(&compStream,Z_NO_FLUSH); iRet = deflate(&compStream,Z_NO_FLUSH);
if(iRet != Z_OK) if(iRet != Z_OK)

View File

@@ -170,7 +170,7 @@ CreateSocketAdress(
int iRet; int iRet;
fd_set lMask; fd_set lMask;
struct timeval tmo = {1,0}; struct timeval tmo = {1,0};
int iLen, i; unsigned int iLen, i;
struct linger lili; struct linger lili;
assert(self != NULL); assert(self != NULL);
@@ -378,7 +378,7 @@ CreateSocketAdress(
{ {
int t; int t;
int len; unsigned int len;
struct sockaddr_in sin; struct sockaddr_in sin;
struct hostent *host; struct hostent *host;
@@ -773,7 +773,7 @@ int NETReconnect(mkChannel* self)
i = 1; i = 1;
setsockopt(pRes->sockid,SOL_SOCKET,SO_REUSEADDR,&i,sizeof(int)); setsockopt(pRes->sockid,SOL_SOCKET,SO_REUSEADDR,&i,sizeof(int));
assert(pRes->sockid < (sizeof(long)*8)); assert(pRes->sockid < (int)(sizeof(long)*8));
/* if this fails the masks for select will be to /* if this fails the masks for select will be to
short. short.
*/ */
@@ -855,7 +855,7 @@ int NETReconnect(mkChannel* self)
long lMask = 0L; long lMask = 0L;
struct timeval tmo ={0,1}; struct timeval tmo ={0,1};
long iRet; long iRet;
int iLang; unsigned int iLang;
if(!VerifyChannel(self)) if(!VerifyChannel(self))
{ {

View File

@@ -167,7 +167,7 @@ static void PLC_Notify(void* context, int event)
*/ */
static int GetCallback(pAsyncTxn txn) static int GetCallback(pAsyncTxn txn)
{ {
int iRet,i; int iRet;
unsigned int iRead; unsigned int iRead;
char* resp = txn->inp_buf; char* resp = txn->inp_buf;
int resp_len = txn->inp_idx; int resp_len = txn->inp_idx;
@@ -197,6 +197,7 @@ static int GetCallback(pAsyncTxn txn)
DMC2280MotionControl = 0; DMC2280MotionControl = 0;
} }
if (self->oldValue != self->iValue) { if (self->oldValue != self->iValue) {
unsigned int i;
for (i=0; i < sizeof(plc_parname)/sizeof(plc_parname[0]); i++) { for (i=0; i < sizeof(plc_parname)/sizeof(plc_parname[0]); i++) {
plcVar = (pSicsVariable)FindCommandData(pServ->pSics,plc_parname[i],"SicsVariable"); plcVar = (pSicsVariable)FindCommandData(pServ->pSics,plc_parname[i],"SicsVariable");
PLC_GetState(self,plc_parname[i],&plcState); PLC_GetState(self,plc_parname[i],&plcState);
@@ -468,7 +469,8 @@ int SafetyPLCFactory(SConnection *pCon, SicsInterp *pSics,
void *pData, int argc, char *argv[]) void *pData, int argc, char *argv[])
{ {
pSafetyPLCController pNew = NULL; pSafetyPLCController pNew = NULL;
int iRet, status, i; int iRet, status;
unsigned int i;
char pError[256]; char pError[256];
pSicsVariable plcVar=NULL; pSicsVariable plcVar=NULL;
PLC_STATUS plcState; PLC_STATUS plcState;