nuttx-apps/examples/chrono
Xiang Xiao b5f14a2072 examples/chrono: Fix the compiler warning when -fno-builtin isn't set
Error: chrono_main.c:434:51: error: '%01ld' directive output may be truncated writing between 1 and 3 bytes into a region of size between 2 and 10 [-Werror=format-truncation=]
  434 |           snprintf(str, sizeof(str), "%02ld:%02ld:%01ld",
      |                                                   ^~~~~
chrono_main.c:434:38: note: directive argument in the range [-21, 21]
  434 |           snprintf(str, sizeof(str), "%02ld:%02ld:%01ld",
      |                                      ^~~~~~~~~~~~~~~~~~~
chrono_main.c:434:11: note: 'snprintf' output between 8 and 18 bytes into a destination of size 16
  434 |           snprintf(str, sizeof(str), "%02ld:%02ld:%01ld",
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435 |                    min, sec, (priv->ts_end.tv_nsec / 100000000));
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 17:27:15 +02:00
..
chrono_main.c examples/chrono: Fix the compiler warning when -fno-builtin isn't set 2022-03-07 17:27:15 +02:00
Kconfig Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE 2020-03-27 02:43:11 -05:00
Make.defs Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00