[prev in list] [next in list] [prev in thread] [next in thread]
List: cgit
Subject: [PATCH] Remove bogus warning in submodule link code
From: hjemli () gmail ! com (Lars Hjemli)
Date: 2011-06-20 18:31:46
Message-ID: BANLkTim9Y4tXRyHsQzkCqz9c9vC_m=JdsA () mail ! gmail ! com
[Download RAW message or body]
On Thu, Jun 16, 2011 at 16:42, Dan McGee <dpmcgee at gmail.com> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic