fuixed warning messages
This commit is contained in:
+29
-29
@@ -1308,37 +1308,37 @@ epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = {
|
||||
0, /* character */
|
||||
0, /* long */
|
||||
0, /* IEEE double */
|
||||
offsetof(dbr_sts_string,value[0]),/* string field with status */
|
||||
offsetof(dbr_sts_short,value), /* short field with status */
|
||||
offsetof(dbr_sts_float,value), /* float field with status */
|
||||
offsetof(dbr_sts_enum,value), /* item number with status */
|
||||
offsetof(dbr_sts_char,value), /* char field with status */
|
||||
offsetof(dbr_sts_long,value), /* long field with status */
|
||||
offsetof(dbr_sts_double,value), /* double field with time */
|
||||
offsetof(dbr_time_string,value[0]),/* string field with time */
|
||||
offsetof(dbr_time_short,value), /* short field with time */
|
||||
offsetof(dbr_time_float,value), /* float field with time */
|
||||
offsetof(dbr_time_enum,value), /* item number with time */
|
||||
offsetof(dbr_time_char,value), /* char field with time */
|
||||
offsetof(dbr_time_long,value), /* long field with time */
|
||||
offsetof(dbr_time_double,value), /* double field with time */
|
||||
offsetof(dbr_sts_string,value[0]),/* graphic string info */
|
||||
offsetof(dbr_gr_short,value), /* graphic short info */
|
||||
offsetof(dbr_gr_float,value), /* graphic float info */
|
||||
offsetof(dbr_gr_enum,value), /* graphic item info */
|
||||
offsetof(dbr_gr_char,value), /* graphic char info */
|
||||
offsetof(dbr_gr_long,value), /* graphic long info */
|
||||
offsetof(dbr_gr_double,value), /* graphic double info */
|
||||
offsetof(dbr_sts_string,value[0]),/* control string info */
|
||||
offsetof(dbr_ctrl_short,value), /* control short info */
|
||||
offsetof(dbr_ctrl_float,value), /* control float info */
|
||||
offsetof(dbr_ctrl_enum,value), /* control item info */
|
||||
offsetof(dbr_ctrl_char,value), /* control char info */
|
||||
offsetof(dbr_ctrl_long,value), /* control long info */
|
||||
offsetof(dbr_ctrl_double,value), /* control double info */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]),/* string field with status */
|
||||
(unsigned short) offsetof(dbr_sts_short,value), /* short field with status */
|
||||
(unsigned short) offsetof(dbr_sts_float,value), /* float field with status */
|
||||
(unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */
|
||||
(unsigned short) offsetof(dbr_sts_char,value), /* char field with status */
|
||||
(unsigned short) offsetof(dbr_sts_long,value), /* long field with status */
|
||||
(unsigned short) offsetof(dbr_sts_double,value), /* double field with time */
|
||||
(unsigned short) offsetof(dbr_time_string,value[0] ),/* string field with time */
|
||||
(unsigned short) offsetof(dbr_time_short,value), /* short field with time */
|
||||
(unsigned short) offsetof(dbr_time_float,value), /* float field with time */
|
||||
(unsigned short) offsetof(dbr_time_enum,value), /* item number with time */
|
||||
(unsigned short) offsetof(dbr_time_char,value), /* char field with time */
|
||||
(unsigned short) offsetof(dbr_time_long,value), /* long field with time */
|
||||
(unsigned short) offsetof(dbr_time_double,value), /* double field with time */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]),/* graphic string info */
|
||||
(unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */
|
||||
(unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */
|
||||
(unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */
|
||||
(unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */
|
||||
(unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */
|
||||
(unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]),/* control string info */
|
||||
(unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */
|
||||
(unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */
|
||||
(unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */
|
||||
(unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */
|
||||
(unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */
|
||||
(unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */
|
||||
0, /* put ackt */
|
||||
0, /* put acks */
|
||||
offsetof(dbr_stsack_string,value[0]),/* string field with status */
|
||||
(unsigned short) offsetof(dbr_stsack_string,value[0]),/* string field with status */
|
||||
0, /* string */
|
||||
};
|
||||
|
||||
|
||||
+4
-4
@@ -2022,9 +2022,9 @@ void verifyOldPend ()
|
||||
* verify that the old ca_pend() is in the symbol table
|
||||
*/
|
||||
status = ca_pend ( 100000.0, 1 );
|
||||
assert ( status = ECA_NORMAL );
|
||||
assert ( status == ECA_NORMAL );
|
||||
status = ca_pend ( 1e-12, 0 );
|
||||
assert ( status = ECA_TIMEOUT );
|
||||
assert ( status == ECA_TIMEOUT );
|
||||
}
|
||||
|
||||
void verifyTimeStamps ( chid chan )
|
||||
@@ -2042,12 +2042,12 @@ void verifyTimeStamps ( chid chan )
|
||||
status = ca_get ( DBR_TIME_DOUBLE, chan, &first );
|
||||
SEVCHK ( status, "fetch of dbr time double failed\n" );
|
||||
status = ca_pend_io ( 20.0 );
|
||||
assert ( status = ECA_NORMAL );
|
||||
assert ( status == ECA_NORMAL );
|
||||
|
||||
status = ca_get ( DBR_TIME_DOUBLE, chan, &last );
|
||||
SEVCHK ( status, "fetch of dbr time double failed\n" );
|
||||
status = ca_pend_io ( 20.0 );
|
||||
assert ( status = ECA_NORMAL );
|
||||
assert ( status == ECA_NORMAL );
|
||||
|
||||
length = epicsTimeToStrftime ( buf, sizeof ( buf ),
|
||||
"%a %b %d %Y %H:%M:%S.%f", &first.stamp );
|
||||
|
||||
Vendored
+3
-5
@@ -73,6 +73,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "shareLib.h"
|
||||
|
||||
@@ -420,7 +421,6 @@ epicsShareFunc unsigned short epicsShareAPI envGetInetPortConfigParam
|
||||
{
|
||||
long longStatus;
|
||||
long epicsParam;
|
||||
int port;
|
||||
|
||||
longStatus = envGetLongConfigParam (pEnv, &epicsParam);
|
||||
if (longStatus!=0) {
|
||||
@@ -429,7 +429,7 @@ epicsShareFunc unsigned short epicsShareAPI envGetInetPortConfigParam
|
||||
errlogPrintf ("setting \"%s\" = %ld\n", pEnv->name, epicsParam);
|
||||
}
|
||||
|
||||
if (epicsParam<=IPPORT_USERRESERVED || epicsParam>0xffff) {
|
||||
if (epicsParam<=IPPORT_USERRESERVED || epicsParam>USHRT_MAX) {
|
||||
errlogPrintf ("EPICS Environment \"%s\" out of range\n", pEnv->name);
|
||||
/*
|
||||
* Quit if the port is wrong due coding error
|
||||
@@ -442,8 +442,6 @@ epicsShareFunc unsigned short epicsShareAPI envGetInetPortConfigParam
|
||||
/*
|
||||
* ok to clip to unsigned short here because we checked the range
|
||||
*/
|
||||
port = (unsigned short) epicsParam;
|
||||
|
||||
return port;
|
||||
return (unsigned short) epicsParam;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user