Fully agree, thank you so much.
I have fixed it. Waiting for other issues that need to be fixed, then
I will re-send the patch.
Thank you!
> This causes GCC to complain thusly:
>
>
> ```
> 2018-07-10T04:59:38.6368270Z ref-filter.c:1477:6: error: variable 'eaten' is
> used uninitialized whenever 'if' condition is false
> [-Werror,-Wsometimes-uninitialized]
> 2018-07-10T04:59:38.6468620Z if (oi->info.contentp) {
>
Hi Olga,
On Mon, 9 Jul 2018, Olga Telezhnaya wrote:
> diff --git a/ref-filter.c b/ref-filter.c
> index 27733ef013bed..f04169f0ea0e3 100644
> --- a/ref-filter.c
> +++ b/ref-filter.c
> @@ -1437,20 +1419,24 @@ static const char *get_refname(struct used_atom
> *atom, struct ref_array_item *re
> }
> static int get_object(struct ref_array_item *ref, const struct object_id
> *oid,
> -int deref, struct object **obj, struct strbuf *err)
> + int deref, struct object **obj, struct strbuf *err)
> {
> int eaten;
Here the variable 'eaten' is
Inline get_obj(): it would be easier to edit the code
without this split.
Signed-off-by: Olga Telezhnaia
---
ref-filter.c | 36 +++-
1 file changed, 11 insertions(+), 25 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 27733ef013bed..f04169f0ea0e3
5 matches
Mail list logo