From 7c75b4ce3dab78609129944ee91131e62ca36085 Mon Sep 17 00:00:00 2001 From: "pph34r@gmail.com" Date: Sat, 2 Jul 2011 14:38:05 +0000 Subject: 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 --- net/http/http_auth_gssapi_posix.cc | 7 +------ net/http/http_auth_gssapi_posix_unittest.cc | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'net/http') 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(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(GSS_S_COMPLETE), major_status); } TEST(HttpAuthGSSAPITest, ParseChallenge_FirstRound) { -- cgit v1.1