Skip to content

Commit

Permalink
Fix log.cpp when compiled with executorch.enable_et_log=false (#4358)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tarun292 authored and facebook-github-bot committed Jul 23, 2024
1 parent d288076 commit 9ef7e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/platform/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
* Get the current timestamp to construct a log event.
Expand Down

0 comments on commit 9ef7e0d

Please sign in to comment.