Skip to content
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: Bad format char #126

Open
ntlhui opened this issue Nov 14, 2024 · 0 comments
Open

fix: Bad format char #126

ntlhui opened this issue Nov 14, 2024 · 0 comments
Assignees

Comments

@ntlhui
Copy link
Contributor

ntlhui commented Nov 14, 2024

[build] [  6%] Building CXX object pc_hal/CMakeFiles/smartfin_pc.dir/__/src/cellular/recorder.cpp.o
[build] src/cellular/recorder.cpp: In function ‘void REC_build_data_filename(uint32_t, char*, size_t)’:
[build] src/cellular/recorder.cpp:31:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
[build]    31 | #define DATA_ROOT "/data"
[build]       |                   ^
[build] src/cellular/recorder.cpp:47:14: note: in expansion of macro ‘DATA_ROOT’
[build]    47 |              DATA_ROOT "/%010lu.bin",
[build]       |              ^~~~~~~~~
[build] src/cellular/recorder.cpp:47:31: note: format string is defined here
[build]    47 |              DATA_ROOT "/%010lu.bin",
[build]       |                          ~~~~~^
[build]       |                               |
[build]       |                               long unsigned int
[build]       |                          %010u

Consider using https://en.cppreference.com/w/cpp/header/cinttypes

@willcyber willcyber self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants