fix warnings
authorChris Lattner <sabre@nondot.org>
Fri, 25 Jun 2004 00:11:25 +0000 (00:11 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Jun 2004 00:11:25 +0000 (00:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14388 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/WriterPrimitives.h

index 5bb01665185d72a3ea52e945cdb671faf83723cd..b76cc55e163d74daae8a980fcdb777fb2d0198eb 100644 (file)
@@ -62,7 +62,7 @@ static inline void output_vbr(uint64_t i, std::deque<unsigned char> &out) {
     
     // Nope, we are bigger than a character, output the next 7 bits and set the
     // high bit to say that there is more coming...
-    out.push_back(0x80 | (i & 0x7F));
+    out.push_back(0x80 | ((unsigned char)i & 0x7F));
     i >>= 7;  // Shift out 7 bits now...
   }
 }
@@ -76,7 +76,7 @@ static inline void output_vbr(unsigned i, std::deque<unsigned char> &out) {
     
     // Nope, we are bigger than a character, output the next 7 bits and set the
     // high bit to say that there is more coming...
-    out.push_back(0x80 | (i & 0x7F));
+    out.push_back(0x80 | ((unsigned char)i & 0x7F));
     i >>= 7;  // Shift out 7 bits now...
   }
 }