Thread (17 messages) flat view 17 messages, 5 authors, 2016-06-15
DORMANTno replies

[PATCH 4/7] Cast pointers to `void *' when used in a format.

From: Florian Forster <hidden>
Date: 2016-06-15 22:42:30
Subsystem: the rest · Maintainer: Linus Torvalds

ANSI C99 requires void-pointers when using the `%p' format. This patch adds the
neccessary cast in `blame.c'.

Signed-off-by: Florian Forster <redacted>


---

 blame.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

372bb52dd567d39c3e64919e100ae9bd8af603ca
diff --git a/blame.c b/blame.c
index 25d3bcf..51eab2e 100644
--- a/blame.c
+++ b/blame.c
@@ -301,9 +301,9 @@ static void fill_line_map(struct commit 
 				if (DEBUG)
 					printf("map: i1: %d %d %p i2: %d %d %p\n",
 					       i1, map[i1],
-					       i1 != -1 ? blame_lines[map[i1]] : NULL,
+					       (void *) (i1 != -1 ? blame_lines[map[i1]] : NULL),
 					       i2, map2[i2],
-					       i2 != -1 ? blame_lines[map2[i2]] : NULL);
+					       (void *) (i2 != -1 ? blame_lines[map2[i2]] : NULL));
 				if (map2[i2] != -1 &&
 				    blame_lines[map[i1]] &&
 				    !blame_lines[map2[i2]])
-- 
1.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help