mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-17 10:23:29 +00:00
memorystress:fix build warning
Summary:
CC: memorystress_main.c memorystress_main.c: In function ‘global_init’:
memorystress_main.c:39:26: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
39 | #define MEMSTRESS_PREFIX "MemoryStress:"
| ^~~~~~~~~~~~~~~
memorystress_main.c:442:22: note: in expansion of macro ‘MEMSTRESS_PREFIX’
442 | syslog(LOG_INFO, MEMSTRESS_PREFIX "\n max_allocsize: %zu\n"
| ^~~~~~~~~~~~~~~~
memorystress_main.c:443:41: note: format string is defined here
443 | " nodelen: %zu\n sleep_us: %lu\n nthreads: %zu\n debug: %s\n",
| ~~^
| |
| long unsigned int
| %u
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
876130b8e7
commit
42d6ae6d07
1 changed files with 2 additions and 1 deletions
|
|
@ -440,7 +440,8 @@ static void global_init(FAR struct memorystress_global_s *global, int argc,
|
|||
}
|
||||
|
||||
syslog(LOG_INFO, MEMSTRESS_PREFIX "\n max_allocsize: %zu\n"
|
||||
" nodelen: %zu\n sleep_us: %lu\n nthreads: %zu\n debug: %s\n",
|
||||
" nodelen: %zu\n sleep_us: %" PRIu32 "\n nthreads: %zu\n "
|
||||
"debug: %s\n",
|
||||
global->max_allocsize, global->nodelen, global->sleep_us,
|
||||
global->nthreads, global->debug ? "true" : "false");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue