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

some windows warnings #955

Closed
chipitsine opened this issue Dec 10, 2023 · 2 comments
Closed

some windows warnings #955

chipitsine opened this issue Dec 10, 2023 · 2 comments

Comments

@chipitsine
Copy link
Contributor

while tried implementing release, I noticed some windows warnings.
shall we mute them? or, make them fatal ?

 D:\a\portable\portable\crypto\compat\chacha_private.h(51,19): warning C4295: 'sigma': array is too small to include a terminating null character (compiling source file D:\a\portable\portable\crypto\compat\arc4random.c) [D:\a\portable\portable\build\crypto\crypto_obj.vcxproj]
D:\a\portable\portable\crypto\compat\chacha_private.h(52,19): warning C4295: 'tau': array is too small to include a terminating null character (compiling source file D:\a\portable\portable\crypto\compat\arc4random.c) [D:\a\portable\portable\build\crypto\crypto_obj.vcxproj]
  crypto_obj.vcxproj -> D:\a\portable\portable\build\crypto\crypto_obj.dir\Release\crypto_obj.lib
  Building Custom Rule D:/a/portable/portable/ssl/CMakeLists.txt
@botovq
Copy link
Contributor

botovq commented Dec 10, 2023

My reading of the C99 standard is that this is valid C, if somewhat ugly. Example 8 of section 6.7.9 contains

char t[3] = "abc";

and makes it explicit that it is identical to char t[] = { 'a', 'b', 'c' }; and this clearly is the intent here.

So while I understand why the compiler warns, this warning should not be made fatal.

@chipitsine
Copy link
Contributor Author

let's postpone those warning for a while

@chipitsine chipitsine closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
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

No branches or pull requests

2 participants