summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Handle.cc2
-rw-r--r--lib/String.cc12
-rw-r--r--lib/TaskMan.cc13
-rw-r--r--lib/Variables.cc2
4 files changed, 19 insertions, 10 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc
index 4585b61..010fce9 100644
--- a/lib/Handle.cc
+++ b/lib/Handle.cc
@@ -54,7 +54,7 @@ ssize_t Handle::write(const void *buf, size_t count) throw (GeneralException) {
} else {
throw IOException(GetName(), IO_WRITE, count);
}
- } else if (r != count) {
+ } else if (((size_t) r) != count) {
full = done = false;
((char *)buf) += r;
tr += r;
diff --git a/lib/String.cc b/lib/String.cc
index d131fba..0fa4278 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -74,6 +74,8 @@ String::~String() {
const char * String::set(const char * s, ...) {
va_list ap;
+/* This causes a warning: cannot pass objects of type `const String' through `...'
+ but it is not really a problem. */
va_start(ap, s);
vsnprintf(t, BUFSIZ, s, ap);
free(str);
@@ -99,17 +101,17 @@ const char * String::to_charp(size_t from, ssize_t to) const {
if (to < 0) {
strncpy(t, &(str[from]), BUFSIZ);
} else {
- if (to >= siz) {
+ if (((size_t) to) >= siz) {
to = siz - 1;
}
- if ((to - from) > BUFSIZ) {
+ if ((((size_t) to) - from) > BUFSIZ) {
from -= (to - from) - BUFSIZ;
}
- if (to >= from) {
- int i;
- for (i = 0; i <= to - from; i++) {
+ if (((size_t) to) >= from) {
+ size_t i;
+ for (i = 0; i <= ((size_t) to) - from; i++) {
t[i] = str[i + from];
}
t[i] = '\0';
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index 94e89b1..89f27f8 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -233,18 +233,18 @@ void TaskMan::MainLoop() throw (GeneralException) {
r = select(highest + 1, &readfds, &writefds, &exceptfds, NULL);
#endif
if (r < 0) {
- if (errno == EINTR) {
- // child
- } else {
+ if (errno != EINTR) {
throw GeneralException(String(_("Error during poll: ")) + strerror(errno));
}
} else if (r == 0) {
// timeout...
+ // **FIXME**
+#warning FIXME
} else {
int fd;
#ifdef USE_POLL
struct pollfd * q;
- int i;
+ unsigned int i;
for (q = ufsd, i = 0; i < nfds; i++, q++) {
if (q->revents & POLLNVAL) {
throw GeneralException(String(_("Error with poll, handle ")) + q->fd + _(" invalid."));
@@ -338,5 +338,10 @@ void TaskMan::MainLoop() throw (GeneralException) {
Zombies.erase(Zombies.begin());
}
}
+
+ if (got_sigchild) {
+ // **FIXME**
+#warning FIXME
+ }
}
}
diff --git a/lib/Variables.cc b/lib/Variables.cc
index 7bdf65d..274a4ed 100644
--- a/lib/Variables.cc
+++ b/lib/Variables.cc
@@ -48,6 +48,8 @@ void Variables::Dump(Handle * h, const String & format) {
(*h) << "<INPUT TYPE=\"HIDDEN\" NAME=\"" << Vn << "\" VALUE=\"" << Vv << "\">" << endnl;
} else {
// Use format here...
+ // **FIXME**
+#warning FIXME
}
}
}