-
Notifications
You must be signed in to change notification settings - Fork 157
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
‘if’ clause does not guard... [-Werror=misleading-indentation] #48
Comments
I have the identical issue on Kali Linux. |
there are mix of space and tab indentation in that part of the code, just change it all to 4 spaces |
same issue |
"there are mix of space and tab indentation in that part of the code, just change it all to 4 spaces" This is not true, and does nothing to actually fix the problem. The 'if' clause referenced on line 1835 is missing the { and } that includes the ERROR statement that comes afterward. Just adding them, however, doesn't fix the problem, as "unsquashfs.c" looks like it was indented by a psychopath, with random breaks in weird places that don't belong all over the place. example on where the next error occurs if you fix the if statement (unsquashfs.c:1128:49: error: implicit declaration of function 'makedev' [-Werror=implicit-function-declaration]):
Here's what that SHOULD look like (apologies for the wordwrap):
Now, I don't deal with a lot of C code with what I do, mostly python, so someone tell me if I'm completely off base here. But onesy-twosy fixes aren't going to work here. I also tried importing the lastest ver of squashfs (4.4) - no dice. |
The latest pull request fixes these issues: #47 |
this patch can solve this issue, but the build.sh scripts wrote a wrong path which cause the patch not work.
|
|
compiling from commit |
Solve: git clone --quiet --depth 1 --branch "master" https://github.com/devttys0/sasquatch cd sasquatch wget https://github.com/devttys0/sasquatch/pull/47.patch && patch -p1 < 47.patch && sudo ./build.sh |
Despite fixing this error, there is an issue when extracting lzma compressed data from a firmware binary. Where most of the files are empty. |
Doing this, as noted also by @iAmG-r00t, causes some files to be lost while extracting some squashfs images (e.g., see ReFirmLabs/binwalk#618), don't know why. On Ubuntu 22.04.1LTS I suggest to compile using #51 instead:
|
Excellent! Only your method can solve this issue correctly. |
I have tried all solutions here and i still have issues compiling unsquashfs , the original git here even after the patch been revised still gives compiling issues and breaks , all others i get a lot of warnings but compile , however i believe this is not a perfect compilation and somethings may break or not work when using this tool , i used pastebin to post all the compilation , and i came here because i was trying to compile binwalk from source and i got stuck in this tool , so i decided to compile this tool manually . https://pastebin.com/p8Cnyxhx |
Thanks for your solution! It worked for me on WSL2 (Ubuntu 22.04). |
Error:
code from 1835 to 1845:
The text was updated successfully, but these errors were encountered: