On Thu, Jun 16, 2011 at 16:42, Dan McGee <[email protected]> wrote:
> In reality, len should ever be unset here if the conditions are right,
> but there is insufficient info for the compiler to realize this so it
> spits an error. Initialize len so gcc doesn't spit an error.

Thanks. I've applied your patch, but moved the initialization out of
the declaration block:

--- a/ui-shared.c
+++ b/ui-shared.c
@@ -525,7 +525,7 @@ void cgit_submodule_link(
        char tail, *dir;
        size_t len;

-       tail = 0;
+       len = tail = 0;
        list = &ctx.repo->submodules;
        item = lookup_path(list, path);
        if (!item) {

--
larsh

_______________________________________________
cgit mailing list
[email protected]
http://hjemli.net/mailman/listinfo/cgit

Reply via email to