Cannot disable print preview when building chrome |
||
Issue descriptionBuilding on Linux with the gn arg enable_print_preview = false fails: ../../chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc:20:12: error: unused variable 'kErrorIncognito' [-Werror,-Wunused-const-variable] const char kErrorIncognito[] = "Cannot access in incognito mode"; https://codereview.chromium.org/1898503002 introduced that variable. The full command and error: ninja: Entering directory `out_linux/Release' [21298/23828] CXX obj/chrome/browser/extensions/extensions/cloud_print_private_api.o FAILED: obj/chrome/browser/extensions/extensions/cloud_print_private_api.o /usr/local/google/home/michaelpg/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/extensions/extensions/cloud_print_private_api.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_TOPCHROME_MD=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=268419-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DMOJO_USE_SYSTEM_IMPL -DMOJO_USE_GLES2_IMPL -DTOOLKIT_VIEWS=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DV8_SHARED -DUSING_V8_SHARED -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DPROTOBUF_USE_DLLS -DV8_SHARED -DUSING_V8_SHARED -DBORINGSSL_SHARED_LIBRARY -DLEVELDB_PLATFORM_CHROMIUM=1 -DI18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1 -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://i18napis.appspot.com/ssl-aggregate-address/\" -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -I../.. -Igen -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Igen -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/mesa/src/include -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -Igen -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/dom_distiller_js/dist/proto_gen -Igen/components/strings -Igen/components/strings -Igen/components/strings -Igen/components/strings -I../../v8/include -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/nss -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/nspr -I../../third_party/boringssl/src/include -Igen/ui/resources -Igen/ui/resources -I../../third_party/libwebm/source -I../../third_party/opus/src/include -I../../third_party/re2/src -Igen/extensions -Igen/extensions -Igen/extensions -Igen -Igen/extensions/strings -Igen -Igen/components -Igen/components -Igen -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/libaddressinput/chromium/override -I../../third_party/webrtc_overrides -I../../third_party -Igen/ui/keyboard -Igen/ui/views/resources -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/dbus-1.0 -I../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu/dbus-1.0/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -fdebug-prefix-map=/usr/local/google/home/michaelpg/dev/c/work1/src=. -pthread -m64 -march=x86-64 -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -O2 -fno-ident -fdata-sections -ffunction-sections -g0 --sysroot=../../build/linux/debian_wheezy_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang check-implicit-copy-ctors -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wno-header-guard -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc -o obj/chrome/browser/extensions/extensions/cloud_print_private_api.o ../../chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc:20:12: error: unused variable 'kErrorIncognito' [-Werror,-Wunused-const-variable] const char kErrorIncognito[] = "Cannot access in incognito mode"; ^ 1 error generated.
,
May 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aefb7f695c0cfb750974c8662fe7db6f6da91693 commit aefb7f695c0cfb750974c8662fe7db6f6da91693 Author: weili <weili@chromium.org> Date: Sat May 07 05:45:53 2016 Allow compiling with enable_print_preview=false Earlier the warning shows an "unused variable" which is only used when enable_print_preview is true. So enclose the variable definition as well to avoid the compilation warning. BUG= 609723 Review-Url: https://codereview.chromium.org/1958593003 Cr-Commit-Position: refs/heads/master@{#392247} [modify] https://crrev.com/aefb7f695c0cfb750974c8662fe7db6f6da91693/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc
,
May 8 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by weili@chromium.org
, May 6 2016Status: Started (was: Untriaged)