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

Fix compiler warnings on all platforms where possible. #288

Open
gsliepen opened this issue Jul 20, 2021 · 4 comments
Open

Fix compiler warnings on all platforms where possible. #288

gsliepen opened this issue Jul 20, 2021 · 4 comments
Labels
1.1 Issue related to Tinc 1.1 janitorial Cleanups of code and documentation that are not bug fixes and not new features. warnings Compilation warnings that needs attention.

Comments

@gsliepen
Copy link
Owner

The logs of the automated builds show that there are still a lot of warnings generated by the compiler. The goal is to have as little warnings as possible. Exceptions are false positives on old compilers (such as warnings about braces around initializers).

@gsliepen gsliepen added warnings Compilation warnings that needs attention. 1.1 Issue related to Tinc 1.1 janitorial Cleanups of code and documentation that are not bug fixes and not new features. labels Jul 20, 2021
@hg
Copy link
Contributor

hg commented Jul 20, 2021

FWIW, I'll be happy to pick this up after getting unit tests in, as a way to further explore the code base.

@fangfufu
Copy link
Collaborator

@gsliepen , what's your view on suppressing compiler warnings using #pragma?

@gsliepen
Copy link
Owner Author

I'd rather not hide warnings.

fangfufu added a commit to fangfufu/tinc that referenced this issue Aug 9, 2021
Part of gsliepen#288

snprintf returns a negative value on output error. In the current
implementation, there is no error handling for negative return
values. Therefore in this context, it is acceptable to convert int
to size_t.
@fangfufu
Copy link
Collaborator

fangfufu commented Aug 9, 2021

What flags should I compile tinc with, anyways?

fangfufu added a commit to fangfufu/tinc that referenced this issue Aug 10, 2021
gsliepen pushed a commit that referenced this issue Aug 10, 2021
@fangfufu fangfufu linked a pull request Aug 10, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.1 Issue related to Tinc 1.1 janitorial Cleanups of code and documentation that are not bug fixes and not new features. warnings Compilation warnings that needs attention.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants