-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lld] Fix warning in SymbolTable.cpp #112323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix gcc warning: lld/ELF/SymbolTable.cpp:340:33: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
@llvm/pr-subscribers-lld-elf Author: Karl-Johan Karlsson (karka228) ChangesFix 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:
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)
|
@llvm/pr-subscribers-lld Author: Karl-Johan Karlsson (karka228) ChangesFix 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:
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)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/8312 Here is the relevant piece of the build log for the reference
|
Fix gcc warning:
lld/ELF/SymbolTable.cpp:340:33: warning: enumeral and non-enumeral type in conditional expression [-Wextra]