Fix more warnings building with VC++
authorChris Lattner <sabre@nondot.org>
Fri, 25 Jun 2004 00:35:55 +0000 (00:35 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Jun 2004 00:35:55 +0000 (00:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14391 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/SlotCalculator.cpp
lib/Bytecode/Writer/Writer.cpp

index 97d336e2db29d1e7487c47c188513210d113cbb0..94791e37b1c25dfd20b77e3a8b7c8806bff9d821 100644 (file)
@@ -717,7 +717,8 @@ int SlotCalculator::insertValue(const Value *D, bool dontIgnore) {
        // If we haven't seen this sub type before, add it to our type table!
         if (getSlot(SubTy) == -1) {
           SC_DEBUG("  Inserting subtype: " << SubTy->getDescription() << "\n");
-          int Slot = doInsertValue(SubTy);
+          SC_DEBUG(int Slot = );
+          doInsertValue(SubTy);
           SC_DEBUG("  Inserted subtype: " << SubTy->getDescription() << 
                    " slot=" << Slot << "\n");
         }
index 5b6fdd79004b996bd1d10dd9de4841913485c5c0..3a17508e9242e7c2e9d0fc2b58e876ac3b01902c 100644 (file)
@@ -340,8 +340,6 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
 
     for (; I != End; ++I) {
       // Symtab entry: [def slot #][name]
-      const Value *V = I->second;
-
       Slot = Table.getSlot(I->second);
       assert(Slot != -1 && "Value in symtab but has no slot number!!");
       output_vbr((unsigned)Slot, Out);
@@ -380,7 +378,7 @@ void llvm::WriteBytecodeToFile(const Module *C, std::ostream &Out) {
     }
     
     // Write out the chunk...
-    Out.write((char*)ChunkPtr, LastPtr-ChunkPtr);
+    Out.write((char*)ChunkPtr, unsigned(LastPtr-ChunkPtr));
   }
 
   Out.flush();