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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/01/15 19:51, Ramsay Jones wrote:
> 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



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]