summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/BLua.cc8
-rw-r--r--lib/CopyJob.cc3
-rw-r--r--lib/Handle.cc3
-rw-r--r--lib/LuaHandle.cc8
-rw-r--r--lib/TaskMan.cc3
5 files changed, 12 insertions, 13 deletions
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);