mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
get rid of the warnings during bootstrapping (#18741)
* fix bootstrapping hints and warnings * revert removals in ccgtypes
This commit is contained in:
@@ -104,7 +104,7 @@ proc fillBuffer(L: var TBaseLexer) =
|
||||
oldBufLen = L.bufLen
|
||||
L.bufLen = L.bufLen * 2
|
||||
L.bufStorage.setLen(L.bufLen)
|
||||
L.buf = L.bufStorage
|
||||
L.buf = L.bufStorage.cstring
|
||||
assert(L.bufLen - oldBufLen == oldBufLen)
|
||||
charsRead = llStreamRead(L.stream, addr(L.buf[oldBufLen]),
|
||||
oldBufLen)
|
||||
@@ -147,7 +147,7 @@ proc openBaseLexer(L: var TBaseLexer, inputstream: PLLStream, bufLen = 8192) =
|
||||
L.bufpos = 0
|
||||
L.offsetBase = 0
|
||||
L.bufStorage = newString(bufLen)
|
||||
L.buf = L.bufStorage
|
||||
L.buf = L.bufStorage.cstring
|
||||
L.bufLen = bufLen
|
||||
L.sentinel = bufLen - 1
|
||||
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:
|
||||
result = newIntNodeT(toInt128(a.strVal.len), n, idgen, g)
|
||||
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:
|
||||
result = newIntNodeT(toInt128(a.len), n, idgen, g)
|
||||
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?
|
||||
md5Update(c, unsafeAddr ch, 1)
|
||||
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) =
|
||||
md5Update(c, cast[cstring](unsafeAddr i), sizeof(i))
|
||||
proc `&=`(c: var MD5Context, f: BiggestFloat) =
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
# 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
|
||||
|
||||
when defined(nimsuggest):
|
||||
|
||||
Reference in New Issue
Block a user