mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 00:11:20 +08: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:
@@ -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"
|
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->max_allocsize, global->nodelen, global->sleep_us,
|
||||||
global->nthreads, global->debug ? "true" : "false");
|
global->nthreads, global->debug ? "true" : "false");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user