Merged
Conversation
fa600c4 to
611a6dd
Compare
lstipakov
requested changes
Feb 18, 2025
openvpn.c:1709:29: warning: ISO C does not support the 'I' scanf flag [-Wformat=] openvpn.c:1709:34: warning: format ‘%u’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘long long unsigned int *’ [-Wformat=] Switch to using portable identifiers. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Avoid warning C4996: '_snwprintf': This function or variable may be unsafe Also makes the code generally simpler. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Avoid warning C4996: '_wfopen': This function or variable may be unsafe Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
But avoid -Wcast-function-type (from -Wextra) since that is not useful for code using GetProcAddress. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This happens on newer MinGW versions: openvpn.c:176:19: error: the comparison will always evaluate as ‘false’ for the pointer operand in ‘flags + -1’ must not be NULL [-Werror=address] Strictly speaking this is a false positive, but the pointer handling is a bit weird, so make the code more straight-forward. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
tray.c:783:36: error: the comparison will always evaluate as ‘true’ for the pointer operand [...] must not be NULL [-Werror=address] True. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
echo.c:221:72: error: comparison of integer expressions of
different signedness: ‘long unsigned int’ and
‘time_t’ {aka ‘long int’} [-Werror=sign-compare]
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
611a6dd to
f84e0fd
Compare
lstipakov
approved these changes
Feb 18, 2025
Member
lstipakov
left a comment
There was a problem hiding this comment.
I haven't tested MinGW, but stared at the code and tested msvc build - looks good (as before).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Try to avoid various compiler warnings both in MinGW and MSVC builds.