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

Re: [PATCHv2 5/5] refs.c: enable large transactions

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jan 22, 2015, 20:13 UTC
Message-ID
<54C15A00.9000706@ramsay1.demon.co.uk>
In-Reply-To
<54C154C0.9020708@ramsay1.demon.co.uk>
On 22/01/15 19:51, Ramsay Jones wrote:
Show 5 quoted lines
> On 22/01/15 19:16, Stefan Beller wrote:
>> How do you run sparse on git?
> 
>   $ make sparse >sp-out 2>&1
> 
BTW, you can get gcc to warn about this also:
 $ rm refs.o
 $ make CFLAGS='-Wall -Wextra' refs.o
    * new build flags
    CC refs.o
In file included from cache.h:4:0,
                 from refs.c:1:
git-compat-util.h: In function ‘git_has_dos_drive_prefix’:
git-compat-util.h:277:56: warning: unused parameter ‘path’ [-Wunused-parameter]
 static inline int git_has_dos_drive_prefix(const char *path)
                                                        ^
In file included from cache.h:4:0,
                 from refs.c:1:
git-compat-util.h: In function ‘xsize_t’:
git-compat-util.h:689:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (len > (size_t) len)
          ^
refs.c: In function ‘check_refname_component’:
refs.c:54:61: warning: unused parameter ‘flags’ [-Wunused-parameter]
 static int check_refname_component(const char *refname, int flags)
                                                             ^
refs.c: In function ‘warn_if_dangling_symref’:
refs.c:1814:78: warning: unused parameter ‘sha1’ [-Wunused-parameter]
 static int warn_if_dangling_symref(const char *refname, const unsigned char *sha1,
                                                                              ^
refs.c: In function ‘log_ref_write_fd’:
refs.c:3042:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (written != len)
              ^
refs.c: In function ‘write_sha1_to_lock_file’:
refs.c:3105:42: warning: ordered comparison of pointer with integer zero [-Wextra]
       || fdopen_lock_file(lock->lk, "w") < 0
                                          ^
refs.c:3110:39: warning: ordered comparison of pointer with integer zero [-Wextra]
   if (fdopen_lock_file(lock->lk, "w") < 0
                                       ^
refs.c: In function ‘create_symref’:
refs.c:3220:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (sizeof(ref) <= len) {
                  ^
refs.c: In function ‘read_ref_at_ent’:
refs.c:3277:15: warning: unused parameter ‘email’ [-Wunused-parameter]
   const char *email, unsigned long timestamp, int tz,
               ^
refs.c: In function ‘read_ref_at_ent_oldest’:
refs.c:3324:19: warning: unused parameter ‘email’ [-Wunused-parameter]
       const char *email, unsigned long timestamp,
                   ^
refs.c: In function ‘for_each_reflog_ent_reverse’:
refs.c:3451:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   cnt = (sizeof(buf) < pos) ? sizeof(buf) : pos;
                      ^
refs.c:3451:43: warning: signed and unsigned type in conditional expression [-Wsign-compare]
   cnt = (sizeof(buf) < pos) ? sizeof(buf) : pos;
                                           ^
refs.c: In function ‘ref_transaction_free’:
refs.c:3659:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < transaction->nr; i++) {
                ^
 $ 
Notice the [-Wextra] warnings above. ;-)

ATB, Ramsay Jones

Previous: Ramsay JonesNext: Stefan Beller
Message 22 of 45 in “[PATCHv2 0/5] Fix bug in large transactions”
  1. Stefan BellerJan 22, 2015
  2. 1/5 update-ref: test handling large transactions properlyStefan Beller, Jan 22, 2015
  3. Michael HaggertyJan 22, 2015
  4. Jeff KingJan 22, 2015
  5. 2/5 t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZEStefan Beller, Jan 22, 2015
  6. 3/5 refs.c: remove lock_fd from struct ref_lockStefan Beller, Jan 22, 2015
  7. 4/5 refs.c: have a write_sha1_to_lock_file wrapperStefan Beller, Jan 22, 2015
  8. 5/5 refs.c: enable large transactionsStefan Beller, Jan 22, 2015
  9. Michael HaggertyJan 22, 2015
  10. Jeff KingJan 22, 2015
  11. Michael HaggertyJan 22, 2015
  12. Stefan BellerJan 22, 2015
  13. 0/5 So you dislike the sequence of system calls?Stefan Beller, Jan 22, 2015
  14. 1/5 fixup for "refs.c: enable large transactions"Stefan Beller, Jan 22, 2015
  15. 2/5 refs.c: remove unlock_ref from write_ref_sha1Stefan Beller, Jan 22, 2015
  16. 3/5 refs.c: move static functions to close and commit refsStefan Beller, Jan 22, 2015
  17. 4/5 refs.c: remove committing the ref from write_ref_sha1Stefan Beller, Jan 22, 2015
  18. 5/5 refs.c: write values to lock files early for committingStefan Beller, Jan 22, 2015
  19. Ramsay JonesJan 22, 2015
  20. Stefan BellerJan 22, 2015
  21. Ramsay JonesJan 22, 2015
  22. Ramsay JonesJan 22, 2015
  23. Stefan BellerJan 22, 2015
  24. Ramsay JonesJan 22, 2015
  25. Michael HaggertyJan 22, 2015
  26. 0/6 Fix bug in large transactionsStefan Beller, Jan 23, 2015
  27. 1/6 update-ref: test handling large transactions properlyStefan Beller, Jan 23, 2015
  28. 2/6 t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZEStefan Beller, Jan 23, 2015
  29. 3/6 refs.c: remove lock_fd from struct ref_lockStefan Beller, Jan 23, 2015
  30. 4/6 refs.c: move static functions to close and commit refsStefan Beller, Jan 23, 2015
  31. 5/6 refs.c: remove unlock_ref and commit_ref from write_ref_sha1Stefan Beller, Jan 23, 2015
  32. Junio C HamanoJan 23, 2015
  33. Stefan BellerJan 24, 2015
  34. Junio C HamanoJan 24, 2015
  35. Stefan BellerJan 24, 2015
  36. Junio C HamanoJan 24, 2015
  37. 6/6 refs.c: enable large transactionsStefan Beller, Jan 23, 2015
  38. Junio C HamanoJan 24, 2015
  39. Stefan BellerJan 24, 2015
  40. Junio C HamanoJan 24, 2015
  41. Stefan BellerJan 26, 2015
  42. refs.c: clean up write_ref_sha1 returnsStefan Beller, Jan 26, 2015
  43. Junio C HamanoJan 27, 2015
  44. Stefan BellerJan 28, 2015
  45. Junio C HamanoJan 27, 2015

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.