diff options
-rw-r--r-- | include/generic.h | 8 | ||||
-rw-r--r-- | lib/BLua.cc | 8 | ||||
-rw-r--r-- | lib/CopyJob.cc | 3 | ||||
-rw-r--r-- | lib/Handle.cc | 3 | ||||
-rw-r--r-- | lib/LuaHandle.cc | 8 | ||||
-rw-r--r-- | lib/TaskMan.cc | 3 |
6 files changed, 19 insertions, 14 deletions
diff --git a/include/generic.h b/include/generic.h index 243e8a7..08af5f1 100644 --- a/include/generic.h +++ b/include/generic.h @@ -17,11 +17,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: generic.h,v 1.35 2005-11-13 13:43:21 pixel Exp $ */ +/* $Id: generic.h,v 1.36 2006-02-02 14:09:48 pixel Exp $ */ #ifndef __GENERIC_H__ #define __GENERIC_H__ +#ifdef _WIN32 +// 4996 = 'foobar' was declared deprecated. +// 4244, 4267 = 'foobar': conversion from 'foo' to 'bar', possible loss of data. +#pragma warning(disable:4996 4244 4267) +#endif + #include <sys/types.h> #include <sys/stat.h> #include <string.h> diff --git a/lib/BLua.cc b/lib/BLua.cc index 58aef96..061a1f6 100644 --- a/lib/BLua.cc +++ b/lib/BLua.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: BLua.cc,v 1.34 2006-01-31 17:02:39 pixel Exp $ */ +/* $Id: BLua.cc,v 1.35 2006-02-02 14:09:48 pixel Exp $ */ #include <stdlib.h> #include "BLua.h" @@ -159,9 +159,9 @@ int LuaStatics::notB(lua_State * __L) { L->error("Incorrect arguments to function `notB'"); } - x = L->tonumber(); + x = ~((Uint32) L->tonumber()); - L->push((lua_Number) (~x)); + L->push((lua_Number) x); return 1; } @@ -474,7 +474,7 @@ void Lua::getglobal(const String & name) throw (GeneralException) { load(&b, false); call(0, 1); } - catch (LuaException & l) { + catch (LuaException &) { throw LuaException("Error finding global variable `" + name + "'"); } } diff --git a/lib/CopyJob.cc b/lib/CopyJob.cc index 9f7da95..0a086b9 100644 --- a/lib/CopyJob.cc +++ b/lib/CopyJob.cc @@ -29,9 +29,8 @@ CopyJob::~CopyJob() { int CopyJob::Do() throw (GeneralException) { int tr; - struct timeval now; - #ifndef _WIN32 + struct timeval now; struct timezone tz; if (shape > 0) { diff --git a/lib/Handle.cc b/lib/Handle.cc index 4722e94..b61e063 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Handle.cc,v 1.76 2006-01-31 17:02:39 pixel Exp $ */ +/* $Id: Handle.cc,v 1.77 2006-02-02 14:09:48 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -545,7 +545,6 @@ void copyone(Handle * s, Handle * d, ssize_t size) { #define BSIZE 20480 void copy(Handle * s, Handle * d, ssize_t size) { - long i; static unsigned char b[BSIZE]; long r; diff --git a/lib/LuaHandle.cc b/lib/LuaHandle.cc index a2cfe71..6a7fc33 100644 --- a/lib/LuaHandle.cc +++ b/lib/LuaHandle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: LuaHandle.cc,v 1.17 2006-01-31 17:02:39 pixel Exp $ */ +/* $Id: LuaHandle.cc,v 1.18 2006-02-02 14:09:48 pixel Exp $ */ #include "LuaHandle.h" @@ -180,7 +180,7 @@ int sLuaHandle::read(lua_State * __L) { int sLuaHandle::readstring(lua_State * __L) { Lua * L = Lua::find(__L); - int n = L->gettop(), i; + int n = L->gettop(); Handle * h; String r; @@ -247,7 +247,7 @@ int sLuaHandle::write(lua_State * __L) { int sLuaHandle::writestring(lua_State * __L) { Lua * L = Lua::find(__L); - int n = L->gettop(), i; + int n = L->gettop(); Handle * h; String r; @@ -604,7 +604,7 @@ int sLuaHandle::exists(lua_State * __L) { try { Input testing(L->tostring()); } - catch (IOGeneral & e) { + catch (IOGeneral &) { r = false; } diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc index 8b27e71..84def6c 100644 --- a/lib/TaskMan.cc +++ b/lib/TaskMan.cc @@ -81,7 +81,8 @@ struct pollfd { int poll (struct pollfd *fds, unsigned int nfds, int timeout) { fd_set read_fds, write_fds, except_fds; struct timeval tv = { timeout / 1000, (timeout % 1000) * 1000 }; - int max_fd = 0, i, retval, changedfds; + int max_fd = 0, retval, changedfds; + unsigned int i; FD_ZERO(&read_fds); FD_ZERO(&write_fds); |