Skip to content

Commit

Permalink
fix some Nim warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosborn committed Nov 15, 2024
1 parent 72f0edd commit 137a9c6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ if [ "X$NIM" = "X" ]; then
fi

echo "Using Nim compiler: $NIM"
echo "Runing: $NIM $dir/build/configure.nims ${@@Q}"
echo "Runing: $NIM $dir/build/configure.nims $@"
#echo "Runing: $NIM $dir/build/configure.nims ${@@Q}"
$NIM $dir/build/configure.nims "$@"
2 changes: 1 addition & 1 deletion src/examples/testlapl1.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io/timesliceIo
import physics/wilsonD
import physics/wilsonSolve
import contract
import xmlparser, xmltree, strutils, sequtils, endians, times
import xmlparser, xmltree, strutils, sequtils, times
template `&&`(x: int32): untyped = cast[pointer](unsafeAddr(x))
template `&&`(x: Field): untyped = cast[pointer](unsafeAddr(x[0]))

Expand Down
2 changes: 1 addition & 1 deletion src/io/crc32.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import strutils
#import strutils

type Crc32* = uint32
const InitCrc32* = Crc32(not 0'u32)
Expand Down
2 changes: 1 addition & 1 deletion src/io/readerQiolite.nim
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ proc putP[T](buf: cstring; index: int, count: int; arg: openArray[ptr T]) =

template `&`[T](x: seq[T]): untyped = cast[ptr T](unsafeaddr x[0])
template `+`(x: ptr char, i: SomeInteger): untyped =
cast[ptr char](cast[ByteAddress](x) + ByteAddress(i))
cast[ptr char](cast[uint](x) + uint(i))

proc read[T](rd: var Reader, v: openArray[ptr T]) =
let t0 = getMonoTime()
Expand Down
4 changes: 2 additions & 2 deletions src/io/writerQiolite.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import base
import layout
import strutils, strformat
import strformat
import field
import os
import scidacio
Expand Down Expand Up @@ -87,7 +87,7 @@ proc getP[T](buf: cstring; index: int; count: int; arg: openArray[ptr T]) =

template `&`[T](x: seq[T]): untyped = cast[ptr T](unsafeaddr x[0])
template `+`(x: ptr char, i: SomeInteger): untyped =
cast[ptr char](cast[ByteAddress](x) + ByteAddress(i))
cast[ptr char](cast[uint](x) + uint(i))

proc write[T](wr: var Writer, v: var openArray[ptr T], lat: openArray[int],
md="", ps="") =
Expand Down
2 changes: 1 addition & 1 deletion src/physics/wilsonD.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ setForceInline(false)

import os
import times
import strUtils
#import strutils

import base
import layout
Expand Down
4 changes: 2 additions & 2 deletions src/physics/wilsonSolve.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import physics/wilsonD

import os
import times
import strUtils
#import strutils
import base
import layout
import field
Expand All @@ -11,7 +11,7 @@ import qcdTypes
import solvers/cg
export cg
import solvers/bicgstab
import solvers/solverUtils
#import solvers/solverUtils
#import types
#import profile
#import metaUtils
Expand Down

0 comments on commit 137a9c6

Please sign in to comment.