From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Stefan Beller <sbeller@google.com>
Cc: Jeff King <peff@peff.net>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>,
Michael Haggerty <mhagger@alum.mit.edu>,
Loic Dachary <loic@dachary.org>
Subject: Re: [PATCHv2 5/5] refs.c: enable large transactions
Date: Thu, 22 Jan 2015 20:13:52 +0000 [thread overview]
Message-ID: <54C15A00.9000706@ramsay1.demon.co.uk> (raw)
In-Reply-To: <54C154C0.9020708@ramsay1.demon.co.uk>
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
next prev parent reply other threads:[~2015-01-22 20:14 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 2:32 [PATCHv2 0/5] Fix bug in large transactions Stefan Beller
2015-01-22 2:32 ` [PATCHv2 1/5] update-ref: test handling large transactions properly Stefan Beller
2015-01-22 10:54 ` Michael Haggerty
2015-01-22 13:07 ` Jeff King
2015-01-22 2:32 ` [PATCHv2 2/5] t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE Stefan Beller
2015-01-22 2:32 ` [PATCHv2 3/5] refs.c: remove lock_fd from struct ref_lock Stefan Beller
2015-01-22 2:32 ` [PATCHv2 4/5] refs.c: have a write_sha1_to_lock_file wrapper Stefan Beller
2015-01-22 2:32 ` [PATCHv2 5/5] refs.c: enable large transactions Stefan Beller
2015-01-22 11:24 ` Michael Haggerty
2015-01-22 13:10 ` Jeff King
2015-01-22 16:33 ` Michael Haggerty
2015-01-22 19:24 ` Stefan Beller
2015-01-22 23:11 ` [RFC PATCH 0/5] So you dislike the sequence of system calls? Stefan Beller
2015-01-22 23:11 ` [PATCH 1/5] fixup for "refs.c: enable large transactions" Stefan Beller
2015-01-22 23:11 ` [PATCH 2/5] refs.c: remove unlock_ref from write_ref_sha1 Stefan Beller
2015-01-22 23:11 ` [PATCH 3/5] refs.c: move static functions to close and commit refs Stefan Beller
2015-01-22 23:11 ` [PATCH 4/5] refs.c: remove committing the ref from write_ref_sha1 Stefan Beller
2015-01-22 23:11 ` [PATCH 5/5] refs.c: write values to lock files early for committing Stefan Beller
2015-01-22 12:59 ` [PATCHv2 5/5] refs.c: enable large transactions Ramsay Jones
2015-01-22 19:16 ` Stefan Beller
2015-01-22 19:51 ` Ramsay Jones
2015-01-22 20:13 ` Ramsay Jones [this message]
2015-01-22 20:20 ` Stefan Beller
2015-01-22 20:59 ` Ramsay Jones
2015-01-22 12:05 ` [PATCHv2 0/5] Fix bug in " Michael Haggerty
2015-01-23 20:03 ` [PATCHv3 0/6] " Stefan Beller
2015-01-23 20:03 ` [PATCHv3 1/6] update-ref: test handling large transactions properly Stefan Beller
2015-01-23 20:03 ` [PATCHv3 2/6] t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE Stefan Beller
2015-01-23 20:03 ` [PATCHv3 3/6] refs.c: remove lock_fd from struct ref_lock Stefan Beller
2015-01-23 20:04 ` [PATCHv3 4/6] refs.c: move static functions to close and commit refs Stefan Beller
2015-01-23 20:04 ` [PATCHv3 5/6] refs.c: remove unlock_ref and commit_ref from write_ref_sha1 Stefan Beller
2015-01-23 23:57 ` Junio C Hamano
2015-01-24 0:22 ` Stefan Beller
2015-01-24 0:39 ` Junio C Hamano
2015-01-24 1:04 ` Stefan Beller
2015-01-24 1:29 ` Junio C Hamano
2015-01-23 20:04 ` [PATCHv3 6/6] refs.c: enable large transactions Stefan Beller
2015-01-24 0:14 ` Junio C Hamano
2015-01-24 0:24 ` Stefan Beller
2015-01-24 0:38 ` Junio C Hamano
2015-01-26 19:30 ` Stefan Beller
2015-01-26 21:10 ` [PATCH] refs.c: clean up write_ref_sha1 returns Stefan Beller
2015-01-27 3:22 ` Junio C Hamano
2015-01-28 21:35 ` Stefan Beller
2015-01-27 3:17 ` [PATCHv3 6/6] refs.c: enable large transactions Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C15A00.9000706@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=loic@dachary.org \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).