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

Re: Enable the packed refs file format

From
PRPhil Richards <news@derived-software.ltd.uk>
Date
Sep 20, 2006, 20:19 UTC
Message-ID
<20060920201930.9E48F487D@derisoft.derived-software.demon.co.uk>
In-Reply-To
<Pine.LNX.4.64.0609191407340.4388@g5.osdl.org>
On 2006-09-19, Linus Torvalds <torvalds@osdl.org> wrote:
>  Too bad that we can't get gcc to warn on these things. We do mark it as 
>  "format(printf)", but I don't know of any way to tell gcc that it _has_ to 
>  have that initial constant string.

Not sure if it just a gcc 4.x-ism, but -Wformat-nonliteral or -Wformat-security might be what you are looking for.

`-Wformat-nonliteral'
     If `-Wformat' is specified, also warn if the format string is not a
     string literal and so cannot be checked, unless the format function
     takes its format arguments as a `va_list'.
`-Wformat-security'
     If `-Wformat' is specified, also warn about uses of format
     functions that represent possible security problems.  At present,
     this warns about calls to `printf' and `scanf' functions where the
     format string is not a string literal and there are no format
     arguments, as in `printf (foo);'.  This may be a security hole if
     the format string came from untrusted input and contains `%n'.
     (This is currently a subset of what `-Wformat-nonliteral' warns
     about, but in future warnings may be added to `-Wformat-security'
     that are not included in `-Wformat-nonliteral'.)
phil
-- 
change name before "@" to "phil" for email
Previous: Linus TorvaldsNext: Petr Baudis
Message 4 of 8 in “Enable the packed refs file format”
  1. Linus TorvaldsSep 14, 2006
  2. Petr BaudisSep 19, 2006
  3. Linus TorvaldsSep 19, 2006
  4. Phil RichardsSep 20, 2006
  5. Fix buggy ref recordingPetr Baudis, Sep 22, 2006
  6. Junio C HamanoSep 23, 2006
  7. Petr BaudisSep 23, 2006
  8. pack-refs: fix git_path() usage.Junio C Hamano, Sep 23, 2006

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.