You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/03/09 01:48:36 UTC
[39/50] git commit: TS-1714 Fix some build problems with gcc-4.8
TS-1714 Fix some build problems with gcc-4.8
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/deb8253a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/deb8253a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/deb8253a
Branch: refs/heads/3.3.x
Commit: deb8253a320303aa95ae6c9d646c0be6bde42ba0
Parents: 65bcda8
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Mar 5 20:07:30 2013 -0700
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Mar 5 20:07:30 2013 -0700
----------------------------------------------------------------------
lib/tsconfig/TsErrataUtil.cc | 5 +++--
lib/wccp/WccpStatic.cc | 6 ++++--
proxy/Main.cc | 3 ++-
proxy/logging/LogAccess.cc | 3 ---
4 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/deb8253a/lib/tsconfig/TsErrataUtil.cc
----------------------------------------------------------------------
diff --git a/lib/tsconfig/TsErrataUtil.cc b/lib/tsconfig/TsErrataUtil.cc
index d1d387d..a234dcf 100644
--- a/lib/tsconfig/TsErrataUtil.cc
+++ b/lib/tsconfig/TsErrataUtil.cc
@@ -126,7 +126,8 @@ Errata
log_errno(Errata::Code code, char const* text) {
static size_t const SIZE = 1024;
char buffer[SIZE];
- return logf(code, "%s [%d] %s", text, errno, strerror_r(errno, buffer, SIZE));
+ NOWARN_UNUSED_RETURN(strerror_r(errno, buffer, SIZE));
+ return logf(code, "%s [%d] %s", text, errno, buffer);
}
Errata
@@ -140,7 +141,7 @@ vlogf_errno(Errata& errata, Errata::Id id, Errata::Code code, char const* format
n = vsnprintf(t_buffer, T_SIZE, format, rest);
if (0 <= n && n < T_SIZE) { // still have room.
- strerror_r(e, e_buffer, E_SIZE);
+ NOWARN_UNUSED_RETURN(strerror_r(e, e_buffer, E_SIZE));
n += snprintf(t_buffer + n, T_SIZE - n, "[%d] %s", e, e_buffer);
}
errata.push(id, code, t_buffer);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/deb8253a/lib/wccp/WccpStatic.cc
----------------------------------------------------------------------
diff --git a/lib/wccp/WccpStatic.cc b/lib/wccp/WccpStatic.cc
index 92524f7..87bf4a3 100644
--- a/lib/wccp/WccpStatic.cc
+++ b/lib/wccp/WccpStatic.cc
@@ -22,6 +22,7 @@
# include "WccpLocal.h"
# include "WccpMeta.h"
+# include "ink_error.h"
/* Solaris considers SIOCGIFCONF obsolete and only defines it if
* BSD compatibility activated. */
@@ -154,7 +155,8 @@ ts::Errata
log_errno(ts::Errata::Code code, char const* text) {
static size_t const SIZE = 1024;
char buffer[SIZE];
- return logf(code, "%s [%d] %s", text, errno, strerror_r(errno, buffer, SIZE));
+ NOWARN_UNUSED_RETURN(strerror_r(errno, buffer, SIZE));
+ return logf(code, "%s [%d] %s", text, errno, buffer);
}
ts::Errata
@@ -169,7 +171,7 @@ vlogf_errno(ts::Errata::Code code, char const* format, va_list& rest) {
n = vsnprintf(t_buffer, T_SIZE, format, rest);
if (0 <= n && n < T_SIZE) { // still have room.
- strerror_r(e, e_buffer, E_SIZE);
+ NOWARN_UNUSED_RETURN(strerror_r(e, e_buffer, E_SIZE));
n += snprintf(t_buffer + n, T_SIZE - n, "[%d] %s", e, e_buffer);
}
err.push(ts::Errata::Id(0), code, t_buffer);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/deb8253a/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 231e084..f87eb37 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1278,7 +1278,8 @@ change_uid_gid(const char *user)
char *buf = (char *)ats_malloc(buflen);
- if (0 != geteuid() && 0 == getuid()) seteuid(0); // revert euid if possible.
+ if (0 != geteuid() && 0 == getuid())
+ NOWARN_UNUSED_RETURN(seteuid(0)); // revert euid if possible.
if (0 != geteuid()) {
// Not root so can't change user ID. Logging isn't operational yet so
// we have to write directly to stderr. Perhaps this should be fatal?
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/deb8253a/proxy/logging/LogAccess.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc
index eded71d..acb3a35 100644
--- a/proxy/logging/LogAccess.cc
+++ b/proxy/logging/LogAccess.cc
@@ -661,10 +661,7 @@ LogAccess::marshal_record(char *record, char *buf)
#define LOG_FLOAT RECD_FLOAT
#define LOG_STRING RECD_STRING
- typedef RecInt LogInt;
- typedef RecCounter LogCounter;
typedef RecFloat LogFloat;
- typedef RecString LogString;
RecDataT stype = RECD_NULL;
bool found = false;