git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Barr <davidbarr@google.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Jonathan Nieder <jrnieder@gmail.com>, David Barr <davidbarr@google.com>
Subject: [PATCH 5/7] vcs-svn: fix cppcheck warning
Date: Fri, 25 May 2012 00:04:17 +1000	[thread overview]
Message-ID: <1337868259-45626-6-git-send-email-davidbarr@google.com> (raw)
In-Reply-To: <1337868259-45626-1-git-send-email-davidbarr@google.com>

[vcs-svn/fast_export.c:211]: (warning) Using sizeof with a numeric constant as function argument might not be what you intended.

Signed-off-by: David Barr <davidbarr@google.com>
---
 vcs-svn/fast_export.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 0b2b7b9..d06a81c 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -208,7 +208,7 @@ static long apply_delta(off_t len, struct line_buffer *input,
 		die("cannot apply delta");
 	if (old_data) {
 		/* Read the remainder of preimage and trailing newline. */
-		assert(!signed_add_overflows(preimage.max_off, 1));
+		assert(!signed_add_overflows(preimage.max_off, (off_t) 1));
 		preimage.max_off++;	/* room for newline */
 		if (move_window(&preimage, preimage.max_off - 1, 1))
 			die("cannot seek to end of input");
-- 
1.7.10.2

  parent reply	other threads:[~2012-05-24 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 14:04 [PATCH 0/7] vcs-svn: housekeeping David Barr
2012-05-24 14:04 ` [PATCH 1/7] vcs-svn: prefer constcmp to prefixcmp David Barr
2012-05-24 14:04 ` [PATCH 2/7] vcs-svn: prefer strstr over memmem David Barr
2012-05-24 14:04 ` [PATCH 3/7] vcs-svn: fix signedness warnings David Barr
2012-05-24 14:48   ` Jonathan Nieder
2012-05-31 13:14     ` David Michael Barr
2012-05-24 14:04 ` [PATCH 4/7] vcs-svn: drop no-op reset methods David Barr
2012-05-24 14:04 ` David Barr [this message]
2012-05-24 14:20   ` [PATCH 5/7] vcs-svn: fix cppcheck warning Jonathan Nieder
2012-05-31 11:17     ` David Michael Barr
2012-05-24 14:04 ` [PATCH 6/7] vcs-svn: fix clang-analyzer error David Barr
2012-05-24 14:04 ` [PATCH 7/7] vcs-svn: fix clang-analyzer warning David Barr
2012-05-24 14:33   ` Jonathan Nieder
2012-05-31 11:34     ` David Michael Barr

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337868259-45626-6-git-send-email-davidbarr@google.com \
    --to=davidbarr@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).