From cba132919fff063c1cfbe88e9a6f1bf4583729cb Mon Sep 17 00:00:00 2001 From: pkasting Date: Wed, 19 Nov 2014 19:35:21 -0800 Subject: Use uint16 for port numbers more pervasively. We currently use a mixture of ints and uint16s for port numbers. This triggers a variety of "value possibly truncated" warnings on MSVC (currently disabled) wherever we implicitly truncate. Fix this by using uint16 consistently through more functions. (Using int consistently would be more problematic as the majority of third-party/system APIs that use port numbers use 16-bit types for them.) By far the majority of these changes are fallout from changing IPEndPoint, which is widely used; it'd be difficult to split this CL up into smaller pieces :( Note that I didn't use uint16_t to avoid introducing inconsistencies between existing uint16 usage and new uint16_t usage. Conversion of everything to uint16_t can happen later. This CL was reviewed and approved in pieces in the following CLs: https://codereview.chromium.org/716223002/ https://codereview.chromium.org/717263003/ https://codereview.chromium.org/717373002/ https://codereview.chromium.org/718273002/ https://codereview.chromium.org/722503002/ Committing as TBR to the original reviewers. BUG=81439 TEST=none TBR=gunsch,cpu,jhawkins,davidben,jyasskin,mmenke Review URL: https://codereview.chromium.org/655063002 Cr-Commit-Position: refs/heads/master@{#304961} --- sync/internal_api/attachments/attachment_uploader_impl_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sync') diff --git a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc index c113ac3..0a724b6 100644 --- a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc +++ b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc @@ -282,7 +282,7 @@ void AttachmentUploaderImplTest::SetUp() { base::Bind(&RequestHandler::HandleRequest, base::Unretained(request_handler_.get()))); - GURL url(base::StringPrintf("http://localhost:%d/", server_.port())); + GURL url(base::StringPrintf("http://localhost:%u/", server_.port())); token_service_.reset(new MockOAuth2TokenService); scoped_refptr -- cgit v1.1