-
Notifications
You must be signed in to change notification settings - Fork 906
-
Notifications
You must be signed in to change notification settings - Fork 906
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
Compile fails with gcc 6.1.1 #187
Comments
Went down the rabbit trail trying to fix indentation to make gcc happy... and it is a mess, so I will leave that to someone else. Workaround for the moment, disable -Werror:
|
Bump. |
As @lrvick said, the issue is with all the mixed up indentation styles within this project. The new gcc don't likes this and is issuing a warning. And @lrvick is right. The indentation is really messed up. Spaces, tabs, different indent width of 2, 4, or whatever. All over the files. The whole project needs refactoring. There should be a simple indent rule across the project like two spaces. And most of all: who has the time and is willing to do this? At least for all the .c and .h files. @iceman1001 @holiman @marshmellow42 @pwpiwi & every other active developer: Is it easily possible for you to keep such an indent rule as two spaces (e.g. change the settings of your favorite editor)? |
There is a tool for formatting c code by the name of indent. My suggestion is to run this on all proxmark .c/.h files with I tried it. After this, all indent warnings/errors are gone and the project builds with the new gcc. |
This warning is about misleading indentation, not about subjective coding style. Don't we all use tabs instead of spaces anyway? Instead of removing |
The first line in our HACKING.TXT describes it quite well.
and then the same document starts with:
Still I do like the idea of having a unified way, I'm already sensing that a energy sucking discussion about 2,4,8 spaces as indentation is not any of my interest. There is a reason for me having done whatever in my fork and only some of it finds its way back in to PM3 master. I'll rather have ppl contribution to the code functionality than structual ideas at this point in time. |
You are right @iceman1001. This discussion will be very frustrating and energy sucking, most of all because I prefer spaces over tabs :). Also, it is very hard to enforce a coding style to a project at that stage (age). Therefore, although I don't like the proxmark code (tabs/spaces/line feeds/etc), I will also stick with @pwpiwi suggestion. This seams to be the easy way out. |
I dl the intend software pretty cool. It makes the source code quite unified with spaces between. I used the -kr option and liked what I saw. Did the misstake to apply to . which messed up my scripts. so just *.c and *.h I'll apply that stuff in my fork. step byt step. |
Hehe, yes, .c/.h files should be enough. Also, I don't think a refactoring of the liblua code is needed. For now I pushed @pwpiwi suggestion to the master. Everything should be fine now for gcc 6+ users. |
Reopened. As @iceman1001 pointed out at fd4f21b, @pwpiwi solution does not work for people without gcc 6+. |
I fixed all "misleading-indentation" warnings. That should work for everyone. |
Definitely the best solution. I didn't even think about this because of
😁 |
The text was updated successfully, but these errors were encountered: