git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix two unused variable warnings in gcc 4.6

From
Dan McGee <dpmcgee@gmail.com>
Date
Mar 28, 2011, 13:57 UTC
Message-ID
<AANLkTinUVnBxtp8-_QMh0m-DuqK4mK1=vof_avuV4XFU@mail.gmail.com>
In-Reply-To
<92140045-86C2-4525-A867-7654D3FE53FB@gmail.com>
On Mon, Mar 28, 2011 at 8:05 AM, Joshua Juran <jjuran@gmail.com> wrote:
Show 37 quoted lines
> On Mar 27, 2011, at 6:32 PM, Dan McGee wrote:
>
>> diff --git a/http-fetch.c b/http-fetch.c
>> index 923904f..3af4c71 100644
>> --- a/http-fetch.c
>> +++ b/http-fetch.c
>> @@ -8,7 +8,6 @@ static const char http_fetch_usage[] = "git http-fetch "
>>
>> int main(int argc, const char **argv)
>> {
>> -       const char *prefix;
>>        struct walker *walker;
>>        int commits_on_stdin = 0;
>>        int commits;
>> diff --git a/merge-recursive.c b/merge-recursive.c
>> index 8e82a8b..af13150 100644
>> --- a/merge-recursive.c
>> +++ b/merge-recursive.c
>> @@ -356,7 +356,6 @@ static void
>> make_room_for_directories_of_df_conflicts(struct merge_options *o,
>>         */
>>        const char *last_file = NULL;
>>        int last_len = 0;
>> -       struct stage_data *last_e;
>>        int i;
>>
>>        for (i = 0; i < entries->nr; i++) {
>> @@ -961,7 +959,6 @@ static int process_renames(struct merge_options *o,
>>        }
>>
>>        for (i = 0, j = 0; i < a_renames->nr || j < b_renames->nr;) {
>> -               char *src;
>>                struct string_list *renames1, *renames2Dst;
>>                struct rename *ren1 = NULL, *ren2 = NULL;
>>                const char *branch1, *branch2;
>
> Looks like three unused variables, not two.

You are correct, my lack of caffeine can be blamed for the misleading message. I didn't think it was important enough to resubmit for that though.

-Dan
Previous: Joshua Juran
Message 3 of 3 in “Fix two unused variable warnings in gcc 4.6”
  1. Fix two unused variable warnings in gcc 4.6Dan McGee, Mar 28, 2011
  2. Joshua JuranMar 28, 2011
  3. Dan McGeeMar 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.