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

[PATCH 0/8] more warnings and cleanups

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 16, 2011, 06:53 UTC
Message-ID
<20110316065256.GA5988@elie>
In-Reply-To
<20110316024959.GA24932@elie>
Here are some more patches in the same vein.

Patches 1-4 fix style problems noticed with make CC="c89 -pedantic" (mostly concerning the -pedantic rather than the c89).

Patch 5 updates fast-import.c (and everyone else) to put braces on the same line as "struct foo" --- the waste of space had bothered me every time I hacked on fast-import.c so now is my chance. :)

Patches 6-8 factor out some new functions to un-indent code a little. The indented code was discovered in changing

	struct pretty_print_ctx ctx = {0};

into something more verbose to appease gcc -Wmissing-field-initializers, which probably wasn't a good idea after all. :) But the by-product is nice.

Jonathan Nieder (8):
  enums: omit trailing comma for portability
  compat: make gcc bswap an inline function
  svn-fe: do not use "return" for tail call returning void
  vcs-svn: remove spurious semicolons
  standardize brace placement in struct definitions
  branch: split off function that writes tracking info and commit
    subject
  cherry: split off function to print output lines
  diff --submodule: split into bite-sized pieces
 builtin/add.c         |    3 +-
 builtin/blame.c       |    3 +-
 builtin/branch.c      |   48 +++++++++++++----------
 builtin/grep.c        |    3 +-
 builtin/index-pack.c  |    6 +--
 builtin/log.c         |   34 +++++++++--------
 cache.h               |    2 +-
 commit.h              |    3 +-
 compat/bswap.h        |   18 +++++----
 config.c              |    3 +-
 convert.c             |    2 +-
 diff.c                |    6 +--
 fast-import.c         |   42 +++++++-------------
 http-push.c           |   15 ++-----
 http-walker.c         |    6 +--
 http.h                |   15 ++-----
 merge-recursive.c     |   12 ++----
 pack-check.c          |    3 +-
 string-list.h         |    3 +-
 submodule.c           |  103 +++++++++++++++++++++++++++++--------------------
 transport-helper.c    |    3 +-
 vcs-svn/repo_tree.c   |    2 +-
 vcs-svn/string_pool.c |    2 +-
 vcs-svn/svndump.c     |    3 +-
 24 files changed, 164 insertions(+), 176 deletions(-)
Previous: Jonathan NiederNext: Jonathan Nieder
Message 18 of 34 in “reflog: silence -O3 -Wuninitialized warning”
  1. reflog: silence -O3 -Wuninitialized warningJonathan Nieder, Mar 16, 2011
  2. declare 1-bit bitfields to be unsignedJonathan Nieder, Mar 16, 2011
  3. Junio C HamanoMar 16, 2011
  4. Nguyen Thai Ngoc DuyMar 16, 2011
  5. Junio C HamanoMar 16, 2011
  6. Jonathan NiederMar 16, 2011
  7. Johannes SixtMar 16, 2011
  8. Jonathan NiederMar 16, 2011
  9. Johannes SixtMar 16, 2011
  10. Jonathan NiederMar 16, 2011
  11. 0/6 silence -Wuninitialized warnings that previously used the a = a trickJonathan Nieder, Mar 16, 2011
  12. 1/6 match-trees: kill off remaining -Wuninitialized warningJonathan Nieder, Mar 16, 2011
  13. 2/6 run-command: initialize failed_errno to 0Jonathan Nieder, Mar 16, 2011
  14. 3/6 diff --submodule: suppress -Wuninitialized warning by initializing to NULLJonathan Nieder, Mar 16, 2011
  15. 4/6 rsync transport: clarify insert_packed_refsJonathan Nieder, Mar 16, 2011
  16. 5/6 wt-status: protect against invalid change_typeJonathan Nieder, Mar 16, 2011
  17. 6/6 fast-import: suppress -Wuninitialized warning by initializing to NULLJonathan Nieder, Mar 16, 2011
  18. 0/8 more warnings and cleanupsJonathan Nieder, Mar 16, 2011
  19. 1/8 enums: omit trailing comma for portabilityJonathan Nieder, Mar 16, 2011
  20. 2/8 compat: make gcc bswap an inline functionJonathan Nieder, Mar 16, 2011
  21. Johannes SixtMar 16, 2011
  22. Jonathan NiederMar 16, 2011
  23. Junio C HamanoMar 16, 2011
  24. 3/8 svn-fe: do not use "return" for tail call returning voidJonathan Nieder, Mar 16, 2011
  25. 4/8 vcs-svn: remove spurious semicolonsJonathan Nieder, Mar 16, 2011
  26. Junio C HamanoMar 16, 2011
  27. Jonathan NiederMar 16, 2011
  28. 5/8 standardize brace placement in struct definitionsJonathan Nieder, Mar 16, 2011
  29. Junio C HamanoMar 18, 2011
  30. 6/8 branch: split off function that writes tracking info and commit subjectJonathan Nieder, Mar 16, 2011
  31. 7/8 cherry: split off function to print output linesJonathan Nieder, Mar 16, 2011
  32. 8/8 diff --submodule: split into bite-sized piecesJonathan Nieder, Mar 16, 2011
  33. Jens LehmannMar 16, 2011
  34. Jonathan NiederMar 16, 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.