Skip to content

Commit

Permalink
clang/win: Disable -Wwritable-strings for most cloud_print service ta…
Browse files Browse the repository at this point in the history
…rgets.

Suppresses 4 warnings that look like

In file included from ..\..\cloud_print\service\win\cloud_print_service.cc:32:
..\..\cloud_print/service/win/service_controller.h(28,3) :  warning(clang): ISO C++11 does not allow conversion from string literal to 'TCHAR *' (aka 'wchar_t *') [-Wwritable-strings]
  DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CLOUDPRINTSERVICE,
  ^
C:\b\depot_tools\win_toolchain\vs2013_files/VC/atlmfc/include\atlbase.h(3086,10) :  note(clang): expanded from macro 'DECLARE_REGISTRY_APPID_RESOURCEID'
                return _T(appid); \
                       ^
C:\b\depot_tools\win_toolchain\vs2013_files\win8sdk\bin\..\..\VC\include\tchar.h(2498,21) :  note(clang): expanded from macro '_T'
                    ^
C:\b\depot_tools\win_toolchain\vs2013_files\win8sdk\bin\..\..\VC\include\tchar.h(206,21) :  note(clang): expanded from macro '__T'
                    ^
<scratch space>(20,1) :  note(clang): expanded from here
L"{8013FB7C-2E3E-4992-B8BD-05C0C4AB0627}"
^
1 warning generated.

BUG=82385

Review URL: https://codereview.chromium.org/686683004

Cr-Commit-Position: refs/heads/master@{#302471}
  • Loading branch information
nico authored and Commit bot committed Nov 3, 2014
1 parent fa4afa9 commit 4c11a96
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cloud_print/service/service.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,25 @@
'<(DEPTH)/chrome/common_constants.gyp:common_constants',
],
}],
['OS=="win" and clang==1', {
# service_controller.h uses DECLARE_REGISTRY_APPID_RESOURCEID, which
# in msvs2013 returns string literals via a non-const pointer. So
# disable this warning for now.
# TODO(thakis): Remove this once we're on 2014,
# https://connect.microsoft.com/VisualStudio/feedback/details/806376/atl-hindrances-to-adopting-new-strictstrings-conformance-option-in-vs2013
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': ['-Wno-writable-strings'],
},
},
'direct_dependent_settings': {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': ['-Wno-writable-strings'],
},
},
},
}],
['enable_printing!=0', {
'dependencies': [
'<(DEPTH)/printing/printing.gyp:printing',
Expand Down

0 comments on commit 4c11a96

Please sign in to comment.