From bc4780b8ba87528377564d4c8db838d17c05df7d Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 18 Nov 2020 07:31:24 +0900 Subject: [PATCH] libs/libc/uuid/lib_uuid_from_string.c: Fix scanf format warnings --- libs/libc/uuid/lib_uuid_from_string.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/libc/uuid/lib_uuid_from_string.c b/libs/libc/uuid/lib_uuid_from_string.c index 4b6e962a2a..6dd4329f98 100644 --- a/libs/libc/uuid/lib_uuid_from_string.c +++ b/libs/libc/uuid/lib_uuid_from_string.c @@ -22,6 +22,7 @@ * Included Files ****************************************************************************/ +#include #include #include #include @@ -79,7 +80,10 @@ void uuid_from_string(const char *s, uuid_t *u, uint32_t *status) } n = sscanf(s, - "%8x-%4hx-%4hx-%2hhx%2hhx-%2hhx%2hhx%2hhx%2hhx%2hhx%2hhx", + "%08" SCNx32 "-%04" SCNx16 "-%04" SCNx16 + "-%02" SCNx8 "%02" SCNx8 + "-%02" SCNx8 "%02" SCNx8 "%02" SCNx8 + "%02" SCNx8 "%02" SCNx8 "%02" SCNx8, &u->time_low, &u->time_mid, &u->time_hi_and_version, &u->clock_seq_hi_and_reserved, &u->clock_seq_low, &u->node[0], &u->node[1], &u->node[2], &u->node[3], &u->node[4], &u->node[5]);