Re: [PATCH 2/3] ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] so fix that.
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 1, 2019, 09:00 UTC
- Message-ID
- <CAPig+cTEZVt13XBQ9z7aQp0PAZQbN5xRm+PC16iSNNr=G473YQ@mail.gmail.com>
- In-Reply-To
- <01020168a83380fb-ecad8400-915d-497c-841f-096541747cd6-000000@eu-west-1.amazonses.com>
On Fri, Feb 1, 2019 at 3:36 AM Shahzad Lone <shahzadlone@gmail.com> wrote:
Show 9 quoted lines
> diff --git a/pack-revindex.c b/pack-revindex.c
> @@ -186,9 +186,9 @@ int find_revindex_position(struct packed_git *p, off_t ofs)
> struct revindex_entry *find_pack_revindex(struct packed_git *p, off_t ofs)
> {
> -
> + int pos;
> load_pack_revindex(p);
> - const int pos = find_revindex_position(p, ofs);
> + pos = find_revindex_position(p, ofs);Thanks, however, this code was fine until your patch 1/3 changed it to have a declaration after statement. Rather than creating a new patch to fix an earlier mistake in the same patch series, on this project, the proper way to resolve such a problem is use "git rebase -i" to adjust patch 1/3 to not introduce the problem in the first place and drop this patch, and then (re-)submit the patch series.
Also, your Signed-off-by: is missing (see Documentation/SubmittingPatches).