diff --git a/pvAccessApp/ca/caConstants.h b/pvAccessApp/ca/caConstants.h index 5ab07ef..906c9b4 100644 --- a/pvAccessApp/ca/caConstants.h +++ b/pvAccessApp/ca/caConstants.h @@ -32,7 +32,7 @@ namespace epics { const int8 CA_UNKNOWN_MINOR_PROTOCOL_REVISION = 0; /** CA version signature (e.g. 0x50). */ - const int8 CA_VERSION = ((unsigned int8)CA_MAJOR_PROTOCOL_REVISION<<4)|CA_MINOR_PROTOCOL_REVISION; + const int8 CA_VERSION = ((uint8_t)CA_MAJOR_PROTOCOL_REVISION<<4)|CA_MINOR_PROTOCOL_REVISION; /** CA protocol port base. */ const int32 CA_PORT_BASE = 5056; diff --git a/pvAccessApp/remote/blockingTCPTransport.cpp b/pvAccessApp/remote/blockingTCPTransport.cpp index 8e2d736..124530d 100644 --- a/pvAccessApp/remote/blockingTCPTransport.cpp +++ b/pvAccessApp/remote/blockingTCPTransport.cpp @@ -554,7 +554,7 @@ namespace epics { // second byte version - major/minor nibble int8 magic = _socketBuffer->getByte(); _version = _socketBuffer->getByte(); - if((magic != CA_MAGIC) || (((unsigned int8)_version) >> 4)!=CA_MAJOR_PROTOCOL_REVISION) + if((magic != CA_MAGIC) || (((uint8_t)_version) >> 4)!=CA_MAJOR_PROTOCOL_REVISION) { // error... disconnect LOG( diff --git a/pvAccessApp/remote/blockingUDPTransport.cpp b/pvAccessApp/remote/blockingUDPTransport.cpp index 75955cc..342572a 100644 --- a/pvAccessApp/remote/blockingUDPTransport.cpp +++ b/pvAccessApp/remote/blockingUDPTransport.cpp @@ -263,7 +263,7 @@ namespace epics { // second byte version - major/minor nibble int8 magic = receiveBuffer->getByte(); int8 version = receiveBuffer->getByte(); - if((magic != CA_MAGIC) || (((unsigned int8)version) >> 4)!=CA_MAJOR_PROTOCOL_REVISION) + if((magic != CA_MAGIC) || (((uint8_t)version) >> 4)!=CA_MAJOR_PROTOCOL_REVISION) return false; // only data for UDP