Address issue #36 #46
Open
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.
This is a tiny patch that fixes #36 with a code change
I understand that it's possible to use
CFLAGSto make newer versions ofgccaccept the code "as-is" but in my opinion it's better to address it this way by moving the declaration ofverboseinto a single.cand accessing it as anexternelsewhere.Because
verboseis only accessed directly inunsquash.c(by the command-line flag parsing code) I put it there, it seemed the most logicalFor whatever reason I wasn't able to create a clean patch to your patch, so rather than replace the entire
patch0.txtwith the changes, I added apatch1.txt. I assume you'll want to coalesce these into one if you decide to accept thisI didn't do extensive testing on the change but it builds and functions as expected both with and without the
-traceflag. I tested by building (obviously), extracting a few squashfs filesystems I had laying around and making sure the trace output showed up and there weren't any runtime symbol resolution errorsThanks for all your work on binwalk and embedded RE in general!