New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722048 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

WinClang builds fail with -Wunused-private-field when building Headless

Project Member Reported by h...@chromium.org, May 13 2017

Issue description

E.g. from https://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/18259:

This started after https://codereview.chromium.org/2762593002/ landed again.
That did pass win_clang in the CQ so I wonder why it didn't fire there. Is it an official build thing maybe?

[40415/58664] CXX obj/headless/headless_shell_child_lib/headless_content_main_delegate.obj
FAILED: obj/headless/headless_shell_child_lib/headless_content_main_delegate.obj 
C:\b\c\goma_client/gomacc.exe ../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes /FC @obj/headless/headless_shell_child_lib/headless_content_main_delegate.obj.rsp /c ../../headless/lib/headless_content_main_delegate.cc /Foobj/headless/headless_shell_child_lib/headless_content_main_delegate.obj /Fd"obj/headless/headless_shell_child_lib_cc.pdb"
C:\b\c\builder\win_clang\src\headless\lib\headless_content_main_delegate.cc(47,11):  error: unused variable 'kTraceEventBrowserProcessSortIndex' [-Werror,-Wunused-const-variable]
const int kTraceEventBrowserProcessSortIndex = -6;
          ^
1 error generated.
[40416/58664] CXX obj/third_party/WebKit/Source/core/unit_tests/MockFontResourceClient.obj
[40417/58664] CXX obj/third_party/WebKit/Source/core/unit_tests/BaseFetchContextTest.obj
[40418/58664] CXX obj/headless/headless_shell_child_lib/headless_shell.obj
FAILED: obj/headless/headless_shell_child_lib/headless_shell.obj 
C:\b\c\goma_client/gomacc.exe ../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes /FC @obj/headless/headless_shell_child_lib/headless_shell.obj.rsp /c ../../headless/app/headless_shell.cc /Foobj/headless/headless_shell_child_lib/headless_shell.obj /Fd"obj/headless/headless_shell_child_lib_cc.pdb"
In file included from ../../headless/app/headless_shell.cc:23:
C:\b\c\builder\win_clang\src\headless\app\headless_shell.h(99,24):  error: private field 'web_contents_' is not used [-Werror,-Wunused-private-field]
  HeadlessWebContents* web_contents_;
                       ^
C:\b\c\builder\win_clang\src\headless\app\headless_shell.h(102,27):  error: private field 'browser_context_' is not used [-Werror,-Wunused-private-field]
  HeadlessBrowserContext* browser_context_;
                          ^
2 errors generated.
 

Comment 1 by h...@chromium.org, May 13 2017

Status: Started (was: Assigned)
I see, the bot on the CQ is doing a component build, whereas the broken bot does static builds, and the code has #if !defined(CHROME_MULTIPLE_DLL_CHILD) checks.

Fix coming up.
Project Member

Comment 3 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/727830d6051803fe78533922089672dfb652b3ac

commit 727830d6051803fe78533922089672dfb652b3ac
Author: hans <hans@chromium.org>
Date: Sat May 13 17:33:03 2017

Fix non-component Win-Clang build of headless_shell

It was failing due to unused private member variables and an unused constant.

BUG= 722048 
TBR=dvallet,skyostil

Review-Url: https://codereview.chromium.org/2878253002
Cr-Commit-Position: refs/heads/master@{#471597}

[modify] https://crrev.com/727830d6051803fe78533922089672dfb652b3ac/headless/app/headless_shell.cc
[modify] https://crrev.com/727830d6051803fe78533922089672dfb652b3ac/headless/app/headless_shell.h
[modify] https://crrev.com/727830d6051803fe78533922089672dfb652b3ac/headless/lib/headless_content_main_delegate.cc

Comment 4 by h...@chromium.org, May 13 2017

Status: Fixed (was: Started)

Sign in to add a comment