Skip to content

build of executorch triggers a warning related to too many arguments provided for format string #3189

Closed
@mikekgfb

Description

@mikekgfb

build of executorch triggers a warning related to too many arguments provided for format string.
https://github.com/pytorch/torchchat/actions/runs/8768143958/job/24062159094?pr=327

  In file included from /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/../../../executorch/runtime/core/error.h:18,
                   from /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/../../../executorch/runtime/core/result.h:19,
                   from /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/../../../executorch/runtime/core/data_loader.h:14,
                   from /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/../../../executorch/extension/data_loader/mmap_data_loader.h:11,
                   from /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/mmap_data_loader.cpp:9:
  /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/mmap_data_loader.cpp: In function ‘void torch::executor::util::{anonymous}::MunmapSegment(void*, void*, size_t)’:
  /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/mmap_data_loader.cpp:140:9: warning: too many arguments for format [-Wformat-extra-args]
    140 |         "munmap(0x%zx, %zu) failed: %s (ignored)",
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/runner/work/torchchat/torchchat/etorch/executorch/extension/data_loader/../../../executorch/runtime/platform/log.h:161:11: note: in definition of macro ‘ET_LOG’
    161 |           _format,                                                            \
        |           ^~~~~~~
  [ 50%] Building CXX object kernels/portable/CMakeFiles/portable_kernels.dir/cpu/op_argmax.cpp.o

Metadata

Metadata

Assignees

Labels

module: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions