Skip to content

Commit

Permalink
vcs-svn/svndiff.c: squelch false "unused" warning from gcc
Browse files Browse the repository at this point in the history
Curiously, pre_len given to read_length() does not trigger the same warning
even though the code structure is the same. Most likely this is because
read_offset() is used only once and inlining it will make gcc realize that
it has a chance to do more flow analysis. Alas, the analysis is flawed, so
it does not help X-<.

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
gitster committed Jan 27, 2012
1 parent d475536 commit 58ebd98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vcs-svn/svndiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ int svndiff0_apply(struct line_buffer *delta, off_t delta_len,
if (read_magic(delta, &delta_len))
return -1;
while (delta_len) { /* For each window: */
off_t pre_off;
off_t pre_off = pre_off; /* stupid GCC... */
size_t pre_len;

if (read_offset(delta, &pre_off, &delta_len) ||
Expand Down

0 comments on commit 58ebd98

Please sign in to comment.