Skip to content

Commit

Permalink
re-enable ObservableStores and GcUnsafe2 warnings (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored Oct 25, 2024
1 parent 523fa0d commit 6f441a9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
7 changes: 1 addition & 6 deletions nim.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# nim-web3
# Copyright (c) 2019-2023 Status Research & Development GmbH
# Copyright (c) 2019-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
# at your option.
# This file may not be copied, modified, or distributed except according to
# those terms.

# nim.cfg
@if nimHasWarningObservableStores:
warning[ObservableStores]: off
@end

# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121
@if windows and not vcc:
Expand Down
7 changes: 3 additions & 4 deletions tests/test_contract_dsl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ import
type
DummySender = object

proc createMutableContractInvocation(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
proc createImmutableContractInvocation(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
proc createContractDeployment(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
func createMutableContractInvocation(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
func createContractDeployment(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data

proc instantiateContract(t: typedesc): ContractInstance[t, DummySender] =
func instantiateContract(t: typedesc): ContractInstance[t, DummySender] =
discard

proc checkData(a: seq[byte], expectedData: string) =
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# those terms.

import
std/[json, random],
std/random,
pkg/unittest2,
../web3,
chronos, stint,
Expand Down
3 changes: 1 addition & 2 deletions web3.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ proc test(args, path: string) =

exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
" --outdir:build -r --skipParentCfg" &
" --warning[ObservableStores]:off --warning[GcUnsafe2]:off" &
" --styleCheck:usages --styleCheck:error" &
" --hint[XDeclaredButNotUsed]:off --hint[Processing]:off " &
" --hint[Processing]:off " &
path


Expand Down
4 changes: 2 additions & 2 deletions web3/confutils_defs.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# nim-web3
# Copyright (c) 2023 Status Research & Development GmbH
# Copyright (c) 2023-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
Expand All @@ -16,7 +16,7 @@ export primitives

func parseCmdArg*(T: type Address, input: string): T
{.raises: [ValueError].} =
fromHex(T, string input)
fromHex(T, input)

func completeCmdArg*(T: type Address, input: string): seq[string] =
@[]
Expand Down

0 comments on commit 6f441a9

Please sign in to comment.