|
|
Created:
5 years ago by Nico Modified:
5 years ago Reviewers:
bungeman-skia CC:
reviews_skia.org Base URL:
https://chromium.googlesource.com/skia.git@master Target Ref:
refs/heads/master Project:
skia Visibility:
Public. |
Descriptionclang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds.
Fixes warnings like:
..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM'
^~~~~~~~~~~~~~~~~~~~~~~~~
..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL'
SK_TRACEHR(_hr, _msg);\
^~~
..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR'
^~~
BUG=chromium:505318
TBR=reed
This is a trivial implementation change.
Committed: https://skia.googlesource.com/skia/+/573ce20f4298e0a83c36a106cde78f5442801f50
Patch Set 1 #
Total comments: 2
Patch Set 2 : . #Messages
Total messages: 25 (12 generated)
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1503463004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1503463004/1
Note for Reviewers: The CQ is waiting for an approval. If you believe that the CL is not ready yet, or if you would like to L-G-T-M with comments then please uncheck the CQ checkbox. Waiting for LGTM from valid reviewer(s) till 2015-12-05 08:55 UTC
thakis@chromium.org changed reviewers: + bungeman@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: No LGTM from a valid reviewer yet. Please ask for an LGTM from a full Skia committer
bungeman@google.com changed reviewers: + bungeman@google.com - bungeman@chromium.org
https://codereview.chromium.org/1503463004/diff/1/include/utils/win/SkHRESULT.h File include/utils/win/SkHRESULT.h (left): https://codereview.chromium.org/1503463004/diff/1/include/utils/win/SkHRESULT... include/utils/win/SkHRESULT.h:19: #define SK_TRACEHR(_hr, _msg) _hr I will say that this existing code is odd, in that SkTraceHR is void, but this isn't (I suppose I wrote it, but that was a while ago). I think maybe the reason why is to prevent other (real) unused warnings, in instances where SK_TRACEHR is used independently of HR_GENERAL and the hresult will be reported (used) in debug, but isn't actually used in release at all. This might happen when the actual failure mode doesn't make a difference but one of the out parameters already lets us know better if there was success. I think SkFontMgr_win_dw.cpp does something like this. Perhaps this should be 'sk_ignore_unused_variable(_hr)' instead.
https://codereview.chromium.org/1503463004/diff/1/include/utils/win/SkHRESULT.h File include/utils/win/SkHRESULT.h (left): https://codereview.chromium.org/1503463004/diff/1/include/utils/win/SkHRESULT... include/utils/win/SkHRESULT.h:19: #define SK_TRACEHR(_hr, _msg) _hr On 2015/12/06 21:03:47, bungeman1 wrote: > I will say that this existing code is odd, in that SkTraceHR is void, but this > isn't (I suppose I wrote it, but that was a while ago). I think maybe the reason > why is to prevent other (real) unused warnings, in instances where SK_TRACEHR is > used independently of HR_GENERAL and the hresult will be reported (used) in > debug, but isn't actually used in release at all. This might happen when the > actual failure mode doesn't make a difference but one of the out parameters > already lets us know better if there was success. I think SkFontMgr_win_dw.cpp > does something like this. > > Perhaps this should be 'sk_ignore_unused_variable(_hr)' instead. Done. (It looks like skia isn't built with unused variable warnings enabled when building it as part of Chromium; it built fine with PS1 for me. It still built fine when I added "int a = 4;" to some random function in skia.)
Description was changed from ========== clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. Fixes warnings like: ..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM' ^~~~~~~~~~~~~~~~~~~~~~~~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL' SK_TRACEHR(_hr, _msg);\ ^~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR' ^~~ Since SK_TRACEHR() is used only in places where its result isn't used, just let SK_TRACEHR() expand to nothing in release builds. BUG=chromium:505318 ========== to ========== clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. Fixes warnings like: ..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM' ^~~~~~~~~~~~~~~~~~~~~~~~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL' SK_TRACEHR(_hr, _msg);\ ^~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR' ^~~ BUG=chromium:505318 ==========
The CQ bit was checked by bungeman@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1503463004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1503463004/20001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by bungeman@google.com
lgtm
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1503463004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1503463004/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/bu...)
Description was changed from ========== clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. Fixes warnings like: ..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM' ^~~~~~~~~~~~~~~~~~~~~~~~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL' SK_TRACEHR(_hr, _msg);\ ^~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR' ^~~ BUG=chromium:505318 ========== to ========== clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. Fixes warnings like: ..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM' ^~~~~~~~~~~~~~~~~~~~~~~~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL' SK_TRACEHR(_hr, _msg);\ ^~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR' ^~~ BUG=chromium:505318 TBR=reed This is a trivial implementation change. ==========
The CQ bit was checked by bungeman@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1503463004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1503463004/20001
Message was sent while issue was closed.
Description was changed from ========== clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. Fixes warnings like: ..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM' ^~~~~~~~~~~~~~~~~~~~~~~~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL' SK_TRACEHR(_hr, _msg);\ ^~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR' ^~~ BUG=chromium:505318 TBR=reed This is a trivial implementation change. ========== to ========== clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. Fixes warnings like: ..\..\third_party\skia\include\utils\win\SkHRESULT.h(51,23) : note: expanded from macro 'HRNM' ^~~~~~~~~~~~~~~~~~~~~~~~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(26,20) : note: expanded from macro 'HR_GENERAL' SK_TRACEHR(_hr, _msg);\ ^~~ ..\..\third_party\skia\include\utils\win\SkHRESULT.h(20,31) : note: expanded from macro 'SK_TRACEHR' ^~~ BUG=chromium:505318 TBR=reed This is a trivial implementation change. Committed: https://skia.googlesource.com/skia/+/573ce20f4298e0a83c36a106cde78f5442801f50 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/573ce20f4298e0a83c36a106cde78f5442801f50 |