libs/libc/uuid/lib_uuid_from_string.c: Fix scanf format warnings
This commit is contained in:
parent
c22ab31728
commit
bc4780b8ba
@ -22,6 +22,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <uuid.h>
|
||||
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user