[systemd-devel] [PATCH] udev: fix printf(3) type specifier

Shawn Landden shawn at churchofgit.com
Thu Aug 22 21:17:16 PDT 2013


From: Shawn Landden <shawnlandden at gmail.com>

src/udev/udev-rules.c: In function 'add_rule':
src/udev/udev-rules.c:1078:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'int' [-Wformat=]
                                 log_error("invalid key/value pair in file %s on line %u,"
                                 ^
---
 src/udev/udev-rules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 1634812..f14158b 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1076,7 +1076,7 @@ static int add_rule(struct udev_rules *rules, char *line,
 
                                 tmp = cescape(buf);
                                 log_error("invalid key/value pair in file %s on line %u,"
-                                          "starting at character %lu ('%s')\n",
+                                          "starting at character %tu ('%s')\n",
                                           filename, lineno, linepos - line + 1, tmp);
                                 if (linepos[1] == '#')
                                         log_info("hint: comments can only start at beginning of line");
-- 
1.8.4.rc3



More information about the systemd-devel mailing list