diff options
author | pph34r@gmail.com <pph34r@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-02 14:38:05 +0000 |
---|---|---|
committer | pph34r@gmail.com <pph34r@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-02 14:38:05 +0000 |
commit | 7c75b4ce3dab78609129944ee91131e62ca36085 (patch) | |
tree | 7b667951f46397fafc6f6a187ebf5f258e4e3593 /net/http | |
parent | 894f634cee519f550410ee9bd98f76a3bd956736 (diff) | |
download | chromium_src-7c75b4ce3dab78609129944ee91131e62ca36085.zip chromium_src-7c75b4ce3dab78609129944ee91131e62ca36085.tar.gz chromium_src-7c75b4ce3dab78609129944ee91131e62ca36085.tar.bz2 |
GCC 4.6 -Wunused-but-set-variable cleanup.
BUG=87490
TEST=net_unittests
Review URL: http://codereview.chromium.org/7261018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_auth_gssapi_posix.cc | 7 | ||||
-rw-r--r-- | net/http/http_auth_gssapi_posix_unittest.cc | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc index 8a39688..25ee910 100644 --- a/net/http/http_auth_gssapi_posix.cc +++ b/net/http/http_auth_gssapi_posix.cc @@ -244,15 +244,10 @@ std::string DescribeOid(GSSAPILibrary* gssapi_lib, const gss_OID oid) { // Check if the first |kMaxCharsToPrint| characters // contain only printable characters and are NULL terminated. const char* str = reinterpret_cast<const char*>(oid); - bool is_printable = true; size_t str_length = 0; for ( ; str_length < kMaxCharsToPrint; ++str_length) { - if (!str[str_length]) + if (!str[str_length] || !isprint(str[str_length])) break; - if (!isprint(str[str_length])) { - is_printable = false; - break; - } } if (!str[str_length]) { output += base::StringPrintf("\"%s\"", str); diff --git a/net/http/http_auth_gssapi_posix_unittest.cc b/net/http/http_auth_gssapi_posix_unittest.cc index c3f9f75..9ae0cc8 100644 --- a/net/http/http_auth_gssapi_posix_unittest.cc +++ b/net/http/http_auth_gssapi_posix_unittest.cc @@ -162,6 +162,7 @@ TEST(HttpAuthGSSAPIPOSIXTest, GSSAPICycle) { &output_token, &ret_flags, &time_rec); + EXPECT_EQ(queries[i].response_code, major_status); CopyBuffer(&input_token, &output_token); ClearBuffer(&output_token); } @@ -169,6 +170,7 @@ TEST(HttpAuthGSSAPIPOSIXTest, GSSAPICycle) { major_status = mock_library->delete_sec_context(&minor_status, &context_handle, GSS_C_NO_BUFFER); + EXPECT_EQ(static_cast<OM_uint32>(GSS_S_COMPLETE), major_status); } TEST(HttpAuthGSSAPITest, ParseChallenge_FirstRound) { |