-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix log.cpp when compiled with executorch.enable_et_log=false
#4358
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4358
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit c4a1496 with merge base dbc73a6 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D59641404 |
This pull request was exported from Phabricator. Differential Revision: D59641404 |
4724eaa
to
9ef7e0d
Compare
Summary: Pull Request resolved: #4358 Currently, the ASR execution fails with the following error: `xplat/executorch/runtime/platform/log.cpp:21:25: error: unused variable 'kMaxLogMessageLength' [-Werror,-Wunused-const-variable]` (P1484525874). This diff marks kMaxLogMessageLength as `maybe_unused`. Differential Revision: D59641404
runtime/platform/log.cpp
Outdated
@@ -18,7 +18,7 @@ namespace executor { | |||
namespace internal { | |||
|
|||
/// Maximum length of a log message. | |||
static constexpr size_t kMaxLogMessageLength = 256; | |||
__ET_UNUSED static constexpr size_t kMaxLogMessageLength = 256; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't always unused, only when logging is disabled. Instead of annotating it here, please move the definition down into vlogf()
inside the #ifdef
, then it will only be defined when it's actually used. Or guard this definition with #if ET_LOG_ENABLED
so it's only defined when it's actually used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Summary: Currently, the ASR execution fails with the following error: `xplat/executorch/runtime/platform/log.cpp:21:25: error: unused variable 'kMaxLogMessageLength' [-Werror,-Wunused-const-variable]` (P1484525874). This diff marks kMaxLogMessageLength as `maybe_unused`. Reviewed By: dvorjackz Differential Revision: D59641404
9ef7e0d
to
47d5b62
Compare
This pull request was exported from Phabricator. Differential Revision: D59641404 |
Summary: Pull Request resolved: #4358 Currently, the ASR execution fails with the following error: `xplat/executorch/runtime/platform/log.cpp:21:25: error: unused variable 'kMaxLogMessageLength' [-Werror,-Wunused-const-variable]` (P1484525874). This diff marks kMaxLogMessageLength as `maybe_unused`. Reviewed By: dvorjackz Differential Revision: D59641404
This pull request was exported from Phabricator. Differential Revision: D59641404 |
47d5b62
to
c4a1496
Compare
This pull request has been merged in fd2dccf. |
Summary:
Currently, the ASR execution fails with the following error:
xplat/executorch/runtime/platform/log.cpp:21:25: error: unused variable 'kMaxLogMessageLength' [-Werror,-Wunused-const-variable]
(P1484525874).This diff marks kMaxLogMessageLength as
maybe_unused
.Differential Revision: D59641404