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

Re: [RFC/PATCH] git-compat-util.h: Don't define NORETURN under __clang__

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 3, 2010, 21:10 UTC
Message-ID
<AANLkTinNkLNGjFrfmo5za_D10AkcMEMzA8yppA+H+YMe@mail.gmail.com>
In-Reply-To
<vpqvd7rzsfa.fsf@bauges.imag.fr>

Thanks everyone. I should have tested a later version of clang before I sent the patch. It might still be worthwhile to munge the flags for old clangs so that git doesn't error out on it, but if 1.0 doesn't make it into some major OS release and gcc remains the default it's not much of an issue.

On Tue, Aug 3, 2010 at 14:23, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 10 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> (other than that, it's cool to see someone testing another
>> compiler ;-) )
>
> BTW, the only warnings remaining with -Wall with my clang are:
>
> imap-send.c:548:27: warning: data argument not used by format string [-Wformat-extra-args]
>                           cmd->tag, cmd->cmd, cmd->cb.dlen);
>                                               ^

I didn't look into that one. It'd be usefu to check out if the format string is really incomplete there, or if clang is just failing it its analysis.

That's some hairy code, in any case.
> imap-send.c:1089:41: warning: conversion specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
>                snprintf(portstr, sizeof(portstr), "%hu", srvc->port);
>                                                    ~~^   ~~~~~~~~~~
> 2 diagnostics generated.
Looks like that needs a cast.
Previous: Matthieu MoyNext: Benjamin Kramer
Message 5 of 6 in “git-compat-util.h: Don't define NORETURN under __clang__”
  1. git-compat-util.h: Don't define NORETURN under __clang__Ævar Arnfjörð Bjarmason, Aug 3, 2010
  2. Michael J GruberAug 3, 2010
  3. Matthieu MoyAug 3, 2010
  4. Matthieu MoyAug 3, 2010
  5. Ævar Arnfjörð BjarmasonAug 3, 2010
  6. Benjamin KramerAug 3, 2010

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.