RuntimeDyld: fix -Wtype-limits
[oota-llvm.git] / lib / ExecutionEngine / RuntimeDyld / Targets / RuntimeDyldCOFFI386.h
index ddf59693fa12af8d4d8e6f997eeb6d5be5c63388..f593c9ab15db7679f4bbcbbfbb7ceb26262e31cb 100644 (file)
@@ -161,9 +161,9 @@ public:
     }
     case COFF::IMAGE_REL_I386_SECTION:
       // 16-bit section index of the section that contains the target.
-      assert(static_cast<int16_t>(RE.SectionID) <= INT16_MAX &&
+      assert(static_cast<int32_t>(RE.SectionID) <= INT16_MAX &&
              "relocation overflow");
-      assert(static_cast<int16_t>(RE.SectionID) >= INT16_MIN &&
+      assert(static_cast<int32_t>(RE.SectionID) >= INT16_MIN &&
              "relocation underflow");
       DEBUG(dbgs() << "\t\tOffset: " << RE.Offset
                    << " RelType: IMAGE_REL_I386_SECTION Value: " << RE.SectionID