Skip to content
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

C source cleanup #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

C source cleanup #22

wants to merge 2 commits into from

Conversation

ldoolitt
Copy link

@ldoolitt ldoolitt commented Dec 8, 2024

Lint-free even with gcc warning flags turned up to 11

Only question is if y'all want the new Makefile lines
CFLAGS += -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wshadow -pedantic
CFLAGS += -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wundef
commented-out. This patch leaves them in.

Lint-free even with gcc warning flags turned up to 11
@ldoolitt
Copy link
Author

The changes in this PR are all in the category of clarifying intent to the compiler. They allow gcc to process the code -- even with the warning flags turned hyper-sensitive -- without emitting any warnings.
None of my changes will affect the run-time behavior of the code, so I can't claim to have fixed any bugs.
This is actually awesome! It shows that the original code is very clean.
I still recommend accepting my patches, since demonstrating that cleanliness (to gcc, and to the next programmer), and flagging any future regressions, has lasting value.

Remove unneeded -DDEFAULT_SOURCE; turns out this is squeaky-clean pure C99
Now passes cppcheck
@liderbug
Copy link

Newer HS200 switches are using KLAP via port 80. Python-kasa works - although in my mind slow, 2+ seconds vs .002 seconds. Update? Upgrade? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants