summary refs log tree commit diff stats
path: root/lib/pure/rawsockets.nim
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2015-10-02 16:00:33 -0700
committerAman Gupta <aman@tmm1.net>2015-10-02 16:00:33 -0700
commit2f7802bea3f27eae92b828b0cb3d49b451f10839 (patch)
tree0fa1879400c9e2b9c5f84ad1d0d59cb9a729c022 /lib/pure/rawsockets.nim
parent59d226221b3a4502a275038e65c34107130fc4ce (diff)
downloadNim-2f7802bea3f27eae92b828b0cb3d49b451f10839.tar.gz
fix rawsockets test
FAIL: trawsockets.nim
Test "tests/cpp/trawsockets.nim" in category "cpp"
Failure: reNimcCrash
Expected:

Gotten:
Hint: system [Processing]
Hint: trawsockets [Processing]
Hint: rawsockets [Processing]
Hint: unsigned [Processing]
lib/pure/rawsockets.nim(15, 8) Warning: unsigned is deprecated [Deprecated]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: times [Processing]
Hint: posix [Processing]
CC: compiler_trawsockets
CC: stdlib_system
CC: stdlib_rawsockets
CC: stdlib_unsigned
CC: stdlib_os
CC: stdlib_strutils
Error: execution of an external compiler program 'clang++ -c  -w  -I/Users/tmm1/code/nim/lib -o tests/cpp/nimcache/stdlib_rawsockets.o tests/cpp/nimcache/stdlib_rawsockets.cpp' failed with exit code: 256

tests/cpp/nimcache/stdlib_rawsockets.cpp:355:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                LOC6 = gai_strerror(gairesult);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:499:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                LOC5 = hstrerror(h_errno);
                     ^ ~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:650:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                LOC9 = inet_ntop(AF_INET6, ((void*) (addr6)), result->data, ((NI32)chckRange((result ? result->len : 0), ((NI32) (-2147483647 -1)), ((NI32) 2147483647))));
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:771:10: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                        LOC17 = inet_ntop(name.sin6_family, ((void*) ((&name))), ((NCSTRING) (buf)), ((NI32)chckRange(((NI)sizeof(TY143006)), ((NI32) (-2147483647 -1)), ((NI32) 2147483647))));
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:859:10: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                        LOC17 = inet_ntop(name.sin6_family, ((void*) ((&name))), ((NCSTRING) (buf)), ((NI32)chckRange(((NI)sizeof(TY143006)), ((NI32) (-2147483647 -1)), ((NI32) 2147483647))));
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
Diffstat (limited to 'lib/pure/rawsockets.nim')
-rw-r--r--lib/pure/rawsockets.nim1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/pure/rawsockets.nim b/lib/pure/rawsockets.nim
index f5860ef28..1b62913f1 100644
--- a/lib/pure/rawsockets.nim
+++ b/lib/pure/rawsockets.nim
@@ -345,7 +345,6 @@ proc getAddrString*(sockAddr: ptr SockAddr): string =
   elif sockAddr.sa_family == rawAfInet6:
     when not useWinVersion:
       # TODO: Windows
-      var v6addr = cast[ptr Sockaddr_in6](sockAddr).sin6_addr
       result = newString(posix.INET6_ADDRSTRLEN)
       let addr6 = addr cast[ptr Sockaddr_in6](sockAddr).sin6_addr
       discard posix.inet_ntop(posix.AF_INET6, addr6, result.cstring,