get rid of the warnings during bootstrapping (#18741)
* fix bootstrapping hints and warnings * revert removals in ccgtypes
This commit is contained in:
parent
9674ff4361
commit
24178bf8aa
4 changed files with 5 additions and 5 deletions
|
|
@ -104,7 +104,7 @@ proc fillBuffer(L: var TBaseLexer) =
|
||||||
oldBufLen = L.bufLen
|
oldBufLen = L.bufLen
|
||||||
L.bufLen = L.bufLen * 2
|
L.bufLen = L.bufLen * 2
|
||||||
L.bufStorage.setLen(L.bufLen)
|
L.bufStorage.setLen(L.bufLen)
|
||||||
L.buf = L.bufStorage
|
L.buf = L.bufStorage.cstring
|
||||||
assert(L.bufLen - oldBufLen == oldBufLen)
|
assert(L.bufLen - oldBufLen == oldBufLen)
|
||||||
charsRead = llStreamRead(L.stream, addr(L.buf[oldBufLen]),
|
charsRead = llStreamRead(L.stream, addr(L.buf[oldBufLen]),
|
||||||
oldBufLen)
|
oldBufLen)
|
||||||
|
|
@ -147,7 +147,7 @@ proc openBaseLexer(L: var TBaseLexer, inputstream: PLLStream, bufLen = 8192) =
|
||||||
L.bufpos = 0
|
L.bufpos = 0
|
||||||
L.offsetBase = 0
|
L.offsetBase = 0
|
||||||
L.bufStorage = newString(bufLen)
|
L.bufStorage = newString(bufLen)
|
||||||
L.buf = L.bufStorage
|
L.buf = L.bufStorage.cstring
|
||||||
L.bufLen = bufLen
|
L.bufLen = bufLen
|
||||||
L.sentinel = bufLen - 1
|
L.sentinel = bufLen - 1
|
||||||
L.lineStart = 0
|
L.lineStart = 0
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode; idgen: IdGenerator; g: ModuleGraph): P
|
||||||
if a.typ.kind == tyString:
|
if a.typ.kind == tyString:
|
||||||
result = newIntNodeT(toInt128(a.strVal.len), n, idgen, g)
|
result = newIntNodeT(toInt128(a.strVal.len), n, idgen, g)
|
||||||
elif a.typ.kind == tyCstring:
|
elif a.typ.kind == tyCstring:
|
||||||
result = newIntNodeT(toInt128(nimCStrLen(a.strVal)), n, idgen, g)
|
result = newIntNodeT(toInt128(nimCStrLen(a.strVal.cstring)), n, idgen, g)
|
||||||
else:
|
else:
|
||||||
result = newIntNodeT(toInt128(a.len), n, idgen, g)
|
result = newIntNodeT(toInt128(a.len), n, idgen, g)
|
||||||
of mUnaryPlusI, mUnaryPlusF64: result = a # throw `+` away
|
of mUnaryPlusI, mUnaryPlusF64: result = a # throw `+` away
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ proc `&=`(c: var MD5Context, ch: char) =
|
||||||
# XXX suspicious code here; relies on ch being zero terminated?
|
# XXX suspicious code here; relies on ch being zero terminated?
|
||||||
md5Update(c, unsafeAddr ch, 1)
|
md5Update(c, unsafeAddr ch, 1)
|
||||||
proc `&=`(c: var MD5Context, r: Rope) =
|
proc `&=`(c: var MD5Context, r: Rope) =
|
||||||
for l in leaves(r): md5Update(c, l, l.len)
|
for l in leaves(r): md5Update(c, l.cstring, l.len)
|
||||||
proc `&=`(c: var MD5Context, i: BiggestInt) =
|
proc `&=`(c: var MD5Context, i: BiggestInt) =
|
||||||
md5Update(c, cast[cstring](unsafeAddr i), sizeof(i))
|
md5Update(c, cast[cstring](unsafeAddr i), sizeof(i))
|
||||||
proc `&=`(c: var MD5Context, f: BiggestFloat) =
|
proc `&=`(c: var MD5Context, f: BiggestFloat) =
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
# included from sigmatch.nim
|
# included from sigmatch.nim
|
||||||
|
|
||||||
import algorithm, sets, prefixmatches, lineinfos, parseutils, linter, tables
|
import algorithm, sets, prefixmatches, parseutils, tables
|
||||||
from wordrecg import wDeprecated, wError, wAddr, wYield
|
from wordrecg import wDeprecated, wError, wAddr, wYield
|
||||||
|
|
||||||
when defined(nimsuggest):
|
when defined(nimsuggest):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue