binutils/readelf: Remove unused static variables#55
Open
amd-bfilipov wants to merge 1 commit intoamd-stagingfrom
Open
binutils/readelf: Remove unused static variables#55amd-bfilipov wants to merge 1 commit intoamd-stagingfrom
amd-bfilipov wants to merge 1 commit intoamd-stagingfrom
Conversation
Remove static variables do_ctf and do_sframe that are set but never read, causing build failures with LLVM's extended -Wunused-but-set-variable warning. These variables are dead code: - Declared at lines 244-245 as static booleans - Set to true when --ctf or --sframe options are parsed - Never actually used or read anywhere in the code - The actual dump functionality is triggered by request_dump() calls Build error with -Werror enabled: binutils/readelf.c:244:13: error: variable 'do_ctf' set but not used [-Werror,-Wunused-but-set-variable] binutils/readelf.c:245:13: error: variable 'do_sframe' set but not used [-Werror,-Wunused-but-set-variable] Fixes: AIROCGDB-553
Collaborator
|
I think this should go upstream first. |
Collaborator
I agree. This should be simple enough to not take too long to land upstream. Do you have a link to the upstream submission? |
Contributor
Author
Collaborator
I think this should have been posted to binutils@, not gdb-patches@. |
Collaborator
|
@amd-bfilipov If we're picking this from upstream, we don't need a PR. Feel free to close this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove static variables do_ctf and do_sframe that are set but never read, causing build failures with LLVM's extended
-Wunused-but-set-variable warning.
These variables are dead code:
Build error with -Werror enabled:
binutils/readelf.c:244:13: error: variable 'do_ctf' set but not used
[-Werror,-Wunused-but-set-variable]
binutils/readelf.c:245:13: error: variable 'do_sframe' set but not used
[-Werror,-Wunused-but-set-variable]
Fixes: AIROCGDB-553
There is a commit that supresses the issue: 3e011457055bd3868bd05cf80bc1a4482777809b but we should still fix this.
I will send the same patch upstream, this is just a stand in until it gets merged, so we don't block LLVM bumps.