[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10485: Silence warnings for unused
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10485: Silence warnings for unused variables. Define PATH_MAX whenever not defined, |
Date: |
Mon, 29 Dec 2008 16:20:46 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10485
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2008-12-29 16:20:46 +0100
message:
Silence warnings for unused variables. Define PATH_MAX whenever not defined,
as not even POSIX systems are bound to define it. Make the hard-coded length
a bit less mean (1024 instead of 255). Fixes build on GNU/Hurd.
modified:
libnet/http.cpp
=== modified file 'libnet/http.cpp'
--- a/libnet/http.cpp 2008-12-29 14:50:26 +0000
+++ b/libnet/http.cpp 2008-12-29 15:20:46 +0000
@@ -52,8 +52,12 @@
#include "diskstream.h"
#include "cache.h"
+// Not POSIX, so best not rely on it if possible.
+#ifndef PATH_MAX
+# define PATH_MAX 1024
+#endif
+
#if defined(_WIN32) || defined(WIN32)
-# define PATH_MAX 255
# define __PRETTY_FUNCTION__ __FUNCDNAME__
# include <winsock2.h>
# include <direct.h>
@@ -350,10 +354,11 @@
// cerr << "FIXME 2: " << hexify(content->reference(),
content->allocated(), true) << endl;
vector<boost::shared_ptr<amf::Element> > headers =
parseEchoRequest(*content);
- boost::shared_ptr<amf::Element> &el0 = headers[0];
- boost::shared_ptr<amf::Element> &el1 = headers[1];
- boost::shared_ptr<amf::Element> &el3 = headers[3];
- if (headers.size() >= 4) {
+ //boost::shared_ptr<amf::Element> &el0 = headers[0];
+ //boost::shared_ptr<amf::Element> &el1 = headers[1];
+ //boost::shared_ptr<amf::Element> &el3 = headers[3];
+
+ if (headers.size() >= 4) {
if (headers[3]) {
amf::Buffer &reply = formatEchoResponse(headers[1]->getName(),
*headers[3]);
// cerr << "FIXME 3: " << hexify(reply.reference(), reply.allocated(),
true) << endl;
@@ -1151,7 +1156,7 @@
{
// GNASH_REPORT_FUNCTION;
- boost::uint8_t *tmpptr = data;
+ //boost::uint8_t *tmpptr = data;
// FIXME: temporary hacks while debugging
amf::Buffer fixme("00 00 00 00 00 01");
@@ -1420,7 +1425,9 @@
} else {
_que.push(buf);
}
- if (ret == buf->size()) {
+
+ // ret must be more than 0 here
+ if (static_cast<size_t>(ret) == buf->size()) {
continue;
}
} else {
@@ -1467,7 +1474,6 @@
// GNASH_REPORT_FUNCTION;
// struct thread_params thread_data;
string url, filespec, parameters;
- string::size_type pos;
HTTP *www = new HTTP;
bool result = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10485: Silence warnings for unused variables. Define PATH_MAX whenever not defined,,
Benjamin Wolsey <=