]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types.cc: fix sscanf format qualifiers to %u
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 13 Oct 2017 22:00:12 +0000 (00:00 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 25 Oct 2017 16:14:05 +0000 (18:14 +0200)
Fix for:

[src/osd/osd_types.cc:439]: (warning) %d in format string (no. 1) requires
 'int *' but the argument type is 'unsigned int *'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/osd_types.cc

index 40427d0a1a2144ebe9a0355dbc2df57c87a4877e..a76b77e91f9c67099c6c530f3013d6965022b0c4 100644 (file)
@@ -436,7 +436,7 @@ bool spg_t::parse(const char *s)
 
   p = strchr(s, 's');
   if (p) {
-    r = sscanf(p, "s%d", &pshard);
+    r = sscanf(p, "s%u", &pshard);
     if (r == 1) {
       shard = shard_id_t(pshard);
     } else {