[lld] [lld] Fix warning in SymbolTable.cpp (PR #112323)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 23:46:26 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld-elf
Author: Karl-Johan Karlsson (karka228)
<details>
<summary>Changes</summary>
Fix gcc warning:
lld/ELF/SymbolTable.cpp:340:33: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
---
Full diff: https://github.com/llvm/llvm-project/pull/112323.diff
1 Files Affected:
- (modified) lld/ELF/SymbolTable.cpp (+1-1)
``````````diff
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index 02814e04139094..674b1ef983f843 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -337,7 +337,7 @@ void SymbolTable::scanVersionScript() {
globalAsteriskFound = !isLocal;
}
}
- assignWildcard(pat, isLocal ? VER_NDX_LOCAL : ver->id, ver->name);
+ assignWildcard(pat, isLocal ? (uint16_t)VER_NDX_LOCAL : ver->id, ver->name);
};
for (VersionDefinition &v : llvm::reverse(ctx.arg.versionDefinitions)) {
for (SymbolVersion &pat : v.nonLocalPatterns)
``````````
</details>
https://github.com/llvm/llvm-project/pull/112323
More information about the llvm-commits
mailing list