Open d3x0r opened 7 months ago
Visual studio issues a warning about libressl\3.9.0\crypto\empty.c(1,1): warning C4206: nonstandard extension used: translation unit is empty. There are 3 files in 5 targets called 'empty.c' which are compiled, in crypto, tls, and ssl for compat.obj tls_compat.obj, crypto, ssl, and tls targets.
This is a weird hack that is apparently still needed for xcode. I don't know cmake well enough to figure out how to do this properly. See #996
The PKCS#7 code is here: https://github.com/libressl/openbsd/blob/master/src/lib/libcrypto/pkcs7/pk7_doit.c#L640 I need to think about this a bit. I would not be surprised if removing the offending line resulted in whining by another compiler with bad warnings (looking at you gcc)...
I have made a triage of most of the windows warnings a few months back https://github.com/libressl/portable/issues/966#issuecomment-1852994213 I might fix one or the other remaining issues, but this is mostly just busywork with no clear benefit.
I'm not entirely sure I understand what #1004 accomplishes, but I think we would be happy to take a PR.
There are some basic warnings that maybe can be fixed...
Visual studio issues a warning about
libressl\3.9.0\crypto\empty.c(1,1): warning C4206: nonstandard extension used: translation unit is empty
. There are 3 files in 5 targets called 'empty.c' which are compiled, incrypto
,tls
, andssl
forcompat.obj
tls_compat.obj
,crypto
,ssl
, andtls
targets.(Github doesn't have this code? even under tag 3.9.0?) crypto/pkcs7/pk7_doit.c line 657 has 'unreachable code' which is the final 'return NULL' after the forever loop
for(;;)
.There are other 'unreachable code' warnings, but they are actually reachable if the object is invalid and contains an enum value that's not actually part of the enum. So some of these warnings are compiler false positives. Issue filed to MS Any switch withoutActually there's an assert(0) that makes it unreachable in debug build.default:
, that even covers all values defined in anenum
that is the switch condition should actually be the warning, because there are various ways to get values into enum variables that can be not one of the choices in the enum.mostly libressl does compile cleanly.
https://github.com/libressl/portable/issues/1004 I think should still be implemented - don't generate uninstall if
LIBRESSL_SKIP_INSTALL
is enabled in CMake.