From 8f2a2e19b50aaf04a5a443e8815a1af8a2650ed4 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Mon, 7 Jul 2014 14:21:40 -0400 Subject: [PATCH] Really fix unused-variable warnings I misunderstood how ALLOW_UNUSED is meant to be used. Using a macro like MSV_WARNING_SUPPRESS() would be nice, but for some reason it isn't working for me. So now we just manually reference the variable in the code. --- brightray/browser/url_request_context_getter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index ceddfb14acfa..c5cb1061ca9c 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -154,8 +154,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { end = protocol_handlers_.end(); it != end; ++it) { bool set_protocol = job_factory->SetProtocolHandler( it->first, it->second.release()); - ALLOW_UNUSED(set_protocol); DCHECK(set_protocol); + (void)set_protocol; // silence unused-variable warning in Release builds on Windows } protocol_handlers_.clear(); job_factory->SetProtocolHandler(