From 225c8f507421a2eff2ed7a900104431d04ed7e5e Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Fri, 5 Feb 2010 22:23:20 +0000 Subject: linux: build with -Wextra 95% of this is removing "const" from return types, but turning this on found one bug! (A "for" loop that expected its iterator to go negative but which was using an unsigned type.) BUG=34160 Review URL: http://codereview.chromium.org/570012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38266 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/libjingle/files/talk/base/httpcommon.h | 2 +- third_party/libjingle/files/talk/p2p/base/candidate.h | 2 +- third_party/libjingle/files/talk/p2p/base/stunrequest.cc | 2 +- third_party/libjingle/files/talk/p2p/base/stunrequest.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'third_party') diff --git a/third_party/libjingle/files/talk/base/httpcommon.h b/third_party/libjingle/files/talk/base/httpcommon.h index 2893933..fae39f9 100644 --- a/third_party/libjingle/files/talk/base/httpcommon.h +++ b/third_party/libjingle/files/talk/base/httpcommon.h @@ -169,7 +169,7 @@ bool HttpHasNthAttribute(HttpAttributeList& attributes, // Convert RFC1123 date (DoW, DD Mon YYYY HH:MM:SS TZ) to unix timestamp bool HttpDateToSeconds(const std::string& date, unsigned long* seconds); -inline const uint16 UrlDefaultPort(bool secure) { +inline uint16 UrlDefaultPort(bool secure) { return secure ? HTTP_SECURE_PORT : HTTP_DEFAULT_PORT; } diff --git a/third_party/libjingle/files/talk/p2p/base/candidate.h b/third_party/libjingle/files/talk/p2p/base/candidate.h index ac41311..bc88a42 100644 --- a/third_party/libjingle/files/talk/p2p/base/candidate.h +++ b/third_party/libjingle/files/talk/p2p/base/candidate.h @@ -49,7 +49,7 @@ public: void set_address(const talk_base::SocketAddress & address) { address_ = address; } - const float preference() const { return preference_; } + float preference() const { return preference_; } void set_preference(const float preference) { preference_ = preference; } const std::string preference_str() const { std::ostringstream ost; diff --git a/third_party/libjingle/files/talk/p2p/base/stunrequest.cc b/third_party/libjingle/files/talk/p2p/base/stunrequest.cc index 66b8ef6..a4cbe7b 100644 --- a/third_party/libjingle/files/talk/p2p/base/stunrequest.cc +++ b/third_party/libjingle/files/talk/p2p/base/stunrequest.cc @@ -146,7 +146,7 @@ StunRequest::~StunRequest() { delete msg_; } -const StunMessageType StunRequest::type() { +StunMessageType StunRequest::type() { assert(msg_); return msg_->type(); } diff --git a/third_party/libjingle/files/talk/p2p/base/stunrequest.h b/third_party/libjingle/files/talk/p2p/base/stunrequest.h index b36861c..c3d79f9 100644 --- a/third_party/libjingle/files/talk/p2p/base/stunrequest.h +++ b/third_party/libjingle/files/talk/p2p/base/stunrequest.h @@ -88,7 +88,7 @@ public: const std::string& id() { return id_; } // Returns the STUN type of the request message. - const StunMessageType type(); + StunMessageType type(); // Handles messages for sending and timeout. void OnMessage(talk_base::Message* pmsg); -- cgit v1.1