diff options
author | Araq <rumpf_a@web.de> | 2014-02-06 00:27:01 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-06 00:27:01 +0100 |
commit | 550b5d9aeac9afda613406e3fe4bc243ea7f78d4 (patch) | |
tree | 946fea57c59324df9b5d2c9369f0b3f8967256c9 | |
parent | 8215a32eddb10bb6dda056adff3d330baae73fc8 (diff) | |
download | Nim-550b5d9aeac9afda613406e3fe4bc243ea7f78d4.tar.gz |
stdlib compiles mostly without warnings again
-rw-r--r-- | lib/pure/asyncio.nim | 2 | ||||
-rw-r--r-- | lib/pure/htmlparser.nim | 4 | ||||
-rw-r--r-- | lib/pure/irc.nim | 4 | ||||
-rw-r--r-- | lib/pure/matchers.nim | 2 | ||||
-rw-r--r-- | lib/pure/oids.nim | 2 | ||||
-rw-r--r-- | lib/pure/parsecsv.nim | 2 | ||||
-rw-r--r-- | lib/pure/parsesql.nim | 6 | ||||
-rw-r--r-- | lib/pure/xmlparser.nim | 4 | ||||
-rw-r--r-- | todo.txt | 4 |
9 files changed, 14 insertions, 16 deletions
diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim index f13cadaa2..96afc6f4f 100644 --- a/lib/pure/asyncio.nim +++ b/lib/pure/asyncio.nim @@ -689,5 +689,5 @@ when isMainModule: server.listen() d.register(server) - while d.poll(-1): nil + while d.poll(-1): discard diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim index 060f0e386..c38eb7063 100644 --- a/lib/pure/htmlparser.nim +++ b/lib/pure/htmlparser.nim @@ -480,7 +480,7 @@ proc untilElementEnd(x: var TXmlParser, result: PXmlNode, if htmlTag(x.elemName) in {tagOption, tagOptgroup}: errors.add(expected(x, result)) break - else: nil + else: discard result.addNode(parse(x, errors)) of xmlElementEnd: if cmpIgnoreCase(x.elemName, result.tag) == 0: @@ -547,7 +547,7 @@ proc parse(x: var TXmlParser, errors: var seq[string]): PXmlNode = var u = entityToUtf8(x.rawData) if u.len != 0: result = newText(u) next(x) - of xmlEof: nil + of xmlEof: discard proc parseHtml*(s: PStream, filename: string, errors: var seq[string]): PXmlNode = diff --git a/lib/pure/irc.nim b/lib/pure/irc.nim index 750c98516..c1b519b0b 100644 --- a/lib/pure/irc.nim +++ b/lib/pure/irc.nim @@ -476,12 +476,12 @@ when isMainModule: var client = irc("amber.tenthbit.net", nick="TestBot1234", joinChans = @["#flood"]) client.connect() - while True: + while true: var event: TIRCEvent if client.poll(event): case event.typ of EvConnected: - nil + discard of EvDisconnected: break of EvMsg: diff --git a/lib/pure/matchers.nim b/lib/pure/matchers.nim index b57e0c45a..2db7fa660 100644 --- a/lib/pure/matchers.nim +++ b/lib/pure/matchers.nim @@ -54,7 +54,7 @@ proc parseInt*(s: string, value: var int, validRange: TSlice[int]) {. try: discard parseutils.parseInt(s, x, 0) except EOverflow: - nil + discard if x in validRange: value = x when isMainModule: diff --git a/lib/pure/oids.nim b/lib/pure/oids.nim index fbe0dda95..b3e74d2a1 100644 --- a/lib/pure/oids.nim +++ b/lib/pure/oids.nim @@ -28,7 +28,7 @@ proc hexbyte*(hex: char): int = of '0'..'9': result = (ord(hex) - ord('0')) of 'a'..'f': result = (ord(hex) - ord('a') + 10) of 'A'..'F': result = (ord(hex) - ord('A') + 10) - else: nil + else: discard proc parseOid*(str: cstring): TOid = ## parses an OID. diff --git a/lib/pure/parsecsv.nim b/lib/pure/parsecsv.nim index 5970f2090..4b25babec 100644 --- a/lib/pure/parsecsv.nim +++ b/lib/pure/parsecsv.nim @@ -149,7 +149,7 @@ proc readRow*(my: var TCsvParser, columns = 0): bool = of '\c': my.bufpos = handleCR(my, my.bufpos) of '\l': my.bufpos = handleLF(my, my.bufpos) else: break - of '\0': nil + of '\0': discard else: error(my, my.bufpos, my.sep & " expected") break diff --git a/lib/pure/parsesql.nim b/lib/pure/parsesql.nim index 31951e966..3f9686e1e 100644 --- a/lib/pure/parsesql.nim +++ b/lib/pure/parsesql.nim @@ -79,7 +79,7 @@ proc handleHexChar(c: var TSqlLexer, xi: var int) = xi = (xi shl 4) or (ord(c.buf[c.bufpos]) - ord('A') + 10) inc(c.bufpos) else: - nil + discard proc handleOctChar(c: var TSqlLexer, xi: var int) = if c.buf[c.bufpos] in {'0'..'7'}: @@ -373,7 +373,7 @@ proc getOperator(c: var TSqlLexer, tok: var TToken) = of '+': if not trailingPlusMinus and buf[pos+1] notin operators and tok.literal.len > 0: break - of '*', '<', '>', '=': nil + of '*', '<', '>', '=': discard else: break add(tok.literal, buf[pos]) inc(pos) @@ -1120,7 +1120,7 @@ proc rs(n: PSqlNode, s: var string, indent: int, proc ra(n: PSqlNode, s: var string, indent: int) = if n == nil: return case n.kind - of nkNone: nil + of nkNone: discard of nkIdent: if allCharsInSet(n.strVal, {'\33'..'\127'}): s.add(n.strVal) diff --git a/lib/pure/xmlparser.nim b/lib/pure/xmlparser.nim index 16bbe1455..8b8bb3b03 100644 --- a/lib/pure/xmlparser.nim +++ b/lib/pure/xmlparser.nim @@ -96,7 +96,7 @@ proc parse(x: var TXmlParser, errors: var seq[string]): PXmlNode = ## &entity; errors.add(errorMsg(x, "unknown entity: " & x.entityName)) next(x) - of xmlEof: nil + of xmlEof: discard proc parseXml*(s: PStream, filename: string, errors: var seq[string]): PXmlNode = @@ -110,7 +110,7 @@ proc parseXml*(s: PStream, filename: string, of xmlElementOpen, xmlElementStart: result = parse(x, errors) break - of xmlComment, xmlWhitespace, xmlSpecial, xmlPI: nil # just skip it + of xmlComment, xmlWhitespace, xmlSpecial, xmlPI: discard # just skip it of xmlError: errors.add(errorMsg(x)) else: diff --git a/todo.txt b/todo.txt index fef073f90..a9f2e80e5 100644 --- a/todo.txt +++ b/todo.txt @@ -1,11 +1,9 @@ version 0.9.4 ============= +- fix GC issues - fix macros\tstringinterp.nim - test and fix showoff -- test and fix stdlib -- test and fix misc -- fix GC issues - test C source code generation - test and fix closures - test and fix exception handling |