Get rid of warning messages for LONG_MIN

This commit is contained in:
Marty Kraimer
1997-05-30 13:16:18 +00:00
parent 6b415ddb49
commit b95644e9d7
2 changed files with 12 additions and 12 deletions

View File

@@ -441,8 +441,8 @@ int epicsShareAPI cvtLongToString(
return((int)(pdest-startAddr));
}
if(source<0) {
if(source == LONG_MIN) {
sprintf(pdest,"%d",LONG_MIN);
if((unsigned long)source == (unsigned long)LONG_MIN) {
sprintf(pdest,"%lu",(unsigned long)LONG_MIN);
return((int)strlen(pdest));
}
*pdest++ = '-';
@@ -511,8 +511,8 @@ int epicsShareAPI cvtLongToHexString(
return((int)(pdest-startAddr));
}
if(source<0) {
if(source == LONG_MIN) {
sprintf(pdest,"%x",LONG_MIN);
if((unsigned long)source == (unsigned long)LONG_MIN) {
sprintf(pdest,"%x",(unsigned long)LONG_MIN);
return((int)strlen(pdest));
}
*pdest++ = '-';
@@ -547,8 +547,8 @@ int epicsShareAPI cvtLongToOctalString(
return((int)(pdest-startAddr));
}
if(source<0) {
if(source == LONG_MIN) {
sprintf(pdest,"%o",LONG_MIN);
if((unsigned long)source == (unsigned long)LONG_MIN) {
sprintf(pdest,"%o",(unsigned long)LONG_MIN);
return((int)strlen(pdest));
}
*pdest++ = '-';

View File

@@ -441,8 +441,8 @@ int epicsShareAPI cvtLongToString(
return((int)(pdest-startAddr));
}
if(source<0) {
if(source == LONG_MIN) {
sprintf(pdest,"%d",LONG_MIN);
if((unsigned long)source == (unsigned long)LONG_MIN) {
sprintf(pdest,"%lu",(unsigned long)LONG_MIN);
return((int)strlen(pdest));
}
*pdest++ = '-';
@@ -511,8 +511,8 @@ int epicsShareAPI cvtLongToHexString(
return((int)(pdest-startAddr));
}
if(source<0) {
if(source == LONG_MIN) {
sprintf(pdest,"%x",LONG_MIN);
if((unsigned long)source == (unsigned long)LONG_MIN) {
sprintf(pdest,"%x",(unsigned long)LONG_MIN);
return((int)strlen(pdest));
}
*pdest++ = '-';
@@ -547,8 +547,8 @@ int epicsShareAPI cvtLongToOctalString(
return((int)(pdest-startAddr));
}
if(source<0) {
if(source == LONG_MIN) {
sprintf(pdest,"%o",LONG_MIN);
if((unsigned long)source == (unsigned long)LONG_MIN) {
sprintf(pdest,"%o",(unsigned long)LONG_MIN);
return((int)strlen(pdest));
}
*pdest++ = '-';