From 3f78873898a2ca6346ac7b4ca48b5625b431d981 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Thu, 9 Jan 2020 04:19:18 -0800 Subject: [PATCH] remove all remaining warnings when build nim (with -d:nimHasLibFFI) (#13084) * cleanup deprecations in evalffi + elsewhere * remove dead code getOrdValue64 --- compiler/evalffi.nim | 12 ++++++------ compiler/sem.nim | 2 +- compiler/types.nim | 7 ------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/compiler/evalffi.nim b/compiler/evalffi.nim index cb383a393..d53fba816 100644 --- a/compiler/evalffi.nim +++ b/compiler/evalffi.nim @@ -9,7 +9,7 @@ ## This file implements the FFI part of the evaluator for Nim code. -import ast, astalgo, ropes, types, options, tables, dynlib, msgs, os, lineinfos +import ast, types, options, tables, dynlib, msgs, lineinfos import pkg/libffi when defined(windows): @@ -70,7 +70,7 @@ proc importcSymbol*(conf: ConfigRef, sym: PSym): PNode = if theAddr.isNil: globalError(conf, sym.info, "cannot import: " & name) result.intVal = cast[ByteAddress](theAddr) -proc mapType(conf: ConfigRef, t: ast.PType): ptr libffi.TType = +proc mapType(conf: ConfigRef, t: ast.PType): ptr libffi.Type = if t == nil: return addr libffi.type_void case t.kind @@ -415,7 +415,7 @@ proc callForeignFunction*(conf: ConfigRef, call: PNode): PNode = internalAssert conf, call[0].kind == nkPtrLit var cif: TCif - var sig: TParamList + var sig: ParamList # use the arguments' types for varargs support: for i in 1..