hopefully "really" fix a type punning warning by defining the buffer as
[oota-llvm.git] / include / llvm / Bitcode / BitstreamReader.h
index 9a8c370f00475ba515e3825b48057dc8541a9cf3..48a6989deb51200270ce9036839e26744a18073e 100644 (file)
@@ -364,12 +364,13 @@ public:
     uint32_t R = uint32_t(CurWord);
 
     // Read the next word from the stream.
-    uint8_t buf[sizeof(word_t)] = {0};
-    BitStream->getBitcodeBytes().readBytes(NextChar, sizeof(buf), buf, NULL);
+    char buf[sizeof(word_t)] = {0};
+    BitStream->getBitcodeBytes().readBytes(NextChar, sizeof(buf),
+                                           (uint8_t*)buf, NULL);
     
     typedef support::detail::packed_endian_specific_integral
        <word_t, support::little, support::unaligned> Endian_T;
-    CurWord = *(Endian_T*)(void*)buf;
+    CurWord = *(Endian_T*)buf;
 
     NextChar += sizeof(word_t);