Sfoglia il codice sorgente

Fix warning C4310: cast truncates constant value in VS2017 build

Jojakim Stahl 5 anni fa
parent
commit
d9febf7bba
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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) {