Browse Source

Fix warning C4310: cast truncates constant value in VS2017 build

Jojakim Stahl 5 years ago
parent
commit
d9febf7bba
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ua_types_encoding_binary.c

+ 2 - 2
src/ua_types_encoding_binary.c

@@ -636,8 +636,8 @@ DECODE_BINARY(NodeId) {
         return ret;
 
     /* Filter out the bits used only for ExpandedNodeIds */
-    encodingByte &= (u8)~(UA_EXPANDEDNODEID_SERVERINDEX_FLAG |
-                          UA_EXPANDEDNODEID_NAMESPACEURI_FLAG);
+    encodingByte &= (u8)~(u8)(UA_EXPANDEDNODEID_SERVERINDEX_FLAG |
+                              UA_EXPANDEDNODEID_NAMESPACEURI_FLAG);
 
     /* Decode the namespace and identifier */
     switch(encodingByte) {