浏览代码

BUG: When byte order is not known at compile time make sure NeedSwap in cmELF is still initialized.

Brad King 17 年之前
父节点
当前提交
9eee4149ec
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Source/cmELF.cxx

+ 2 - 0
Source/cmELF.cxx

@@ -85,6 +85,8 @@ public:
     this->NeedSwap = (this->ByteOrder == ByteOrderMSB);
     this->NeedSwap = (this->ByteOrder == ByteOrderMSB);
 #elif cmsys_CPU_ENDIAN_ID == cmsys_CPU_ENDIAN_ID_BIG
 #elif cmsys_CPU_ENDIAN_ID == cmsys_CPU_ENDIAN_ID_BIG
     this->NeedSwap = (this->ByteOrder == ByteOrderLSB);
     this->NeedSwap = (this->ByteOrder == ByteOrderLSB);
+#else
+    this->NeedSwap = false; // Final decision is at runtime anyway.
 #endif
 #endif
 
 
     // We have not yet loaded the section info.
     // We have not yet loaded the section info.