From fc6f1d49addf20333e5b566399318d5935bb5dd6 Mon Sep 17 00:00:00 2001 From: stoiko Date: Tue, 14 Aug 2007 19:21:47 +0000 Subject: [PATCH] fixed some warning issues in nselib/bit.c (put casts to lua_Number where necessary) made netutils.h include nbase_winunix.h (otherwise nsock wouldn't compile, because it tried to include reason.h from the MS-platform-SDK but got nmap's reason.h instead) --- nselib/bit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nselib/bit.c b/nselib/bit.c index bcdd7f855..9951a9347 100644 --- a/nselib/bit.c +++ b/nselib/bit.c @@ -19,7 +19,7 @@ typedef unsigned long long UInteger; #define TDYADIC(name, op, checkbit1, checkbit2) \ static int bit_ ## name(lua_State* L) { \ lua_pushnumber(L, \ - checkbit1(L, 1) op checkbit2(L, 2)); \ + (lua_Number)(checkbit1(L, 1) op checkbit2(L, 2))); \ return 1; \ } @@ -28,7 +28,7 @@ typedef unsigned long long UInteger; #define MONADIC(name, op) \ static int bit_ ## name(lua_State* L) { \ - lua_pushnumber(L, op luaL_checkbit(L, 1)); \ + lua_pushnumber(L, (lua_Number)(op luaL_checkbit(L, 1))); \ return 1; \ } @@ -38,7 +38,7 @@ typedef unsigned long long UInteger; Integer w = luaL_checkbit(L, 1); \ for (i = 2; i <= n; i++) \ w op luaL_checkbit(L, i); \ - lua_pushnumber(L, w); \ + lua_pushnumber(L, (lua_Number)w); \ return 1; \ }