Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] MSVC: fix build warnings

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:28

Michael Wookey [off-list ref] writes:
quoted hunk
diff --git a/builtin-branch.c b/builtin-branch.c
index 9f57992..cf6a9ca 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -93,7 +93,7 @@ static const char *branch_get_color(enum color_branch ix)

 static int delete_branches(int argc, const char **argv, int force, int kinds)
 {
-	struct commit *rev, *head_rev = head_rev;
I haven't tried, but the patch may break build with "gcc -Werror".

This is a common and unfortunate idiom to tell the readers of the code
that this initialization is unnecessary, gcc is not clever enough to
notice and gives warnings, and we are squelching it, knowing what we are
doing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help