Thread (10 messages) read the whole thread 10 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH v2 7/9] mailmap: debug: eliminate -Wformat field precision type warning

From: Eric Sunshine <hidden>
Date: 2016-06-15 22:58:10
Subsystem: the rest · Maintainer: Linus Torvalds

The compiler complains that '*' in fprintf() format directive "%.*s"
should have type int, but we pass size_t. Fix this.

Signed-off-by: Eric Sunshine <redacted>
---
 mailmap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mailmap.c b/mailmap.c
index 62d998a..4cc6e81 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -309,7 +309,7 @@ int map_user(struct string_list *map,
 	struct mailmap_entry *me;
 
 	debug_mm("map_user: map '%.*s' <%.*s>\n",
-		 *namelen, *name, *emaillen, *email);
+		 (int)*namelen, *name, (int)*emaillen, *email);
 
 	item = lookup_prefix(map, *email, *emaillen);
 	if (item != NULL) {
@@ -337,8 +337,8 @@ int map_user(struct string_list *map,
 				*name = mi->name;
 				*namelen = strlen(*name);
 		}
-		debug_mm("map_user:  to '%.*s' <%.*s>\n", *namelen, *name,
-				 *emaillen, *email);
+		debug_mm("map_user:  to '%.*s' <%.*s>\n", (int)*namelen, *name,
+				 (int)*emaillen, *email);
 		return 1;
 	}
 	debug_mm("map_user:  --\n");
-- 
1.8.3.2.804.g0da7a53
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help