]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lslocks: fix type warning
authorSami Kerola <kerolasa@iki.fi>
Sat, 3 Jan 2015 09:20:04 +0000 (09:20 +0000)
committerKarel Zak <kzak@redhat.com>
Wed, 7 Jan 2015 09:14:11 +0000 (10:14 +0100)
misc-utils/lslocks.c:229:2: warning: format '%x' expects argument of type
'unsigned int *', but argument 3 has type 'int *' [-Wformat=]

Reference: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/locks.c?id=5e0f872c7d7e371fbdf09e864eddd24bddfda8fe#n2533
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/lslocks.c

index 6dac1879f8e1a7418634f76b9201ff8295eb1efd..9072d6027786248f5af9f20bbe1d80958f02ad85 100644 (file)
@@ -223,7 +223,7 @@ out:
  */
 static ino_t get_dev_inode(char *str, dev_t *dev)
 {
-       int maj = 0, min = 0;
+       unsigned int maj = 0, min = 0;
        ino_t inum = 0;
 
        sscanf(str, "%02x:%02x:%ju", &maj, &min, &inum);