From 5b70350dcba6356ad9824dc27e58332df1399105 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Fri, 10 Dec 2021 10:03:30 +0100 Subject: [PATCH] enable --stylecheck:usages --- bearssl.nimble | 2 +- bearssl/cacert.nim | 2 +- bearssl/decls.nim | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bearssl.nimble b/bearssl.nimble index 91de8eb..2a10445 100644 --- a/bearssl.nimble +++ b/bearssl.nimble @@ -16,7 +16,7 @@ proc test(env, path: string) = lang = getEnv"TEST_LANG" exec "nim " & lang & " " & env & - " -r --hints:off --skipParentCfg " & path + " -r --hints:off --skipParentCfg --styleCheck:usages --styleCheck:error " & path task test, "Run tests": exec "nim -v" diff --git a/bearssl/cacert.nim b/bearssl/cacert.nim index afd3fc2..84f5a37 100644 --- a/bearssl/cacert.nim +++ b/bearssl/cacert.nim @@ -17,7 +17,7 @@ from os import DirSep, AltSep const CurrentPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0] -{.passC: "-I" & CurrentPath & "/certs".} +{.passc: "-I" & CurrentPath & "/certs".} var MozillaTrustAnchors* {. importc: "TAs", header: "cacert20210119.h".}: array[129, X509TrustAnchor] diff --git a/bearssl/decls.nim b/bearssl/decls.nim index 1c1b6e8..939d69c 100644 --- a/bearssl/decls.nim +++ b/bearssl/decls.nim @@ -31,32 +31,32 @@ const bearToolsPath = bearPath & "tools" & "/" bearRootPath = bearSrcPath & "/" -{.passC: "-I" & quoteShell(bearSrcPath)} -{.passC: "-I" & quoteShell(bearIncPath)} -{.passC: "-I" & quoteShell(bearPath & "tools")} +{.passc: "-I" & quoteShell(bearSrcPath)} +{.passc: "-I" & quoteShell(bearIncPath)} +{.passc: "-I" & quoteShell(bearPath & "tools")} when defined(windows): - {.passC: "-DBR_USE_WIN32_TIME=1".} - {.passC: "-DBR_USE_WIN32_RAND=1".} + {.passc: "-DBR_USE_WIN32_TIME=1".} + {.passc: "-DBR_USE_WIN32_RAND=1".} else: - {.passC: "-DBR_USE_UNIX_TIME=1".} - {.passC: "-DBR_USE_URANDOM=1".} + {.passc: "-DBR_USE_UNIX_TIME=1".} + {.passc: "-DBR_USE_URANDOM=1".} when defined(i386) or defined(amd64) or defined(arm64): - {.passC: "-DBR_LE_UNALIGNED=1".} + {.passc: "-DBR_LE_UNALIGNED=1".} elif defined(powerpc) or defined(powerpc64): - {.passC: "-DBR_BE_UNALIGNED=1".} + {.passc: "-DBR_BE_UNALIGNED=1".} elif defined(powerpc64el): - {.passC: "-DBR_LE_UNALIGNED=1".} + {.passc: "-DBR_LE_UNALIGNED=1".} when sizeof(int) == 8: - {.passC: "-DBR_64=1".} + {.passc: "-DBR_64=1".} when hostCPU == "amd64": - {.passC:" -DBR_amd64=1".} + {.passc:" -DBR_amd64=1".} when defined(vcc): - {.passC: "-DBR_UMUL128=1".} + {.passc: "-DBR_UMUL128=1".} else: - {.passC: "-DBR_INT128=1".} + {.passc: "-DBR_INT128=1".} {.compile: bearCodecPath & "ccopy.c".} {.compile: bearCodecPath & "dec16be.c".}