add -d:nimStrictMode in CI to keep code from regressing; fixes ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)

This commit is contained in:
Timothee Cour 2021-02-17 10:30:09 -08:00 • committed by GitHub
commit 31bb67a309
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 43 additions and 23 deletions

View file

@ -88,7 +88,6 @@
import std/private/since
import nativesockets, os, strutils, times, sets, options, std/monotimes
from ssl_certs import scanSSLCertificates
import ssl_config
export nativesockets.Port, nativesockets.`$`, nativesockets.`==`
export Domain, SockType, Protocol
@ -101,6 +100,8 @@ when useWinVersion:
when defineSsl:
import openssl
when not defined(nimDisableCertificateValidation):
from ssl_certs import scanSSLCertificates
# Note: The enumerations are mapped to Window's constants.
@ -670,7 +671,7 @@ when defineSsl:
# That means we can assume that the next internal index is the length of
# extra data indexes.
for i in ctx.referencedData:
GC_unref(getExtraData(ctx, i).RootRef)
GC_unref(getExtraData(ctx, i))
ctx.context.SSL_CTX_free()
proc `pskIdentityHint=`*(ctx: SslContext, hint: string) =