From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Dan McMahill" <dmcmahill@NetBSD.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] diff: "S_IFREG | 0644" to "(S_IFREG | 0644)" to avoid warning
Date: Mon, 4 Oct 2010 09:21:11 +0000 [thread overview]
Message-ID: <1286184071-28457-1-git-send-email-avarab@gmail.com> (raw)
Wrap "S_IFREG | 0644" in parentheses to avoid a "suggest parentheses
around arithmetic in operand of |" warning from GCC 4.1.3 on NetBSD
5.0.2.
I spotted and fixed this independently on NetBSD, but later found that
there was a NetBSD Problem Report that included this fix.
NetBSD-PR: http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=42168
Reported-by: Dan McMahill <dmcmahill@NetBSD.org>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
builtin/diff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/diff.c b/builtin/diff.c
index a43d326..e8b7e09 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -93,7 +93,7 @@ static int builtin_diff_blobs(struct rev_info *revs,
int argc, const char **argv,
struct blobinfo *blob)
{
- unsigned mode = canon_mode(S_IFREG | 0644);
+ unsigned mode = canon_mode((S_IFREG | 0644));
if (argc > 1)
usage(builtin_diff_usage);
--
1.7.3.159.g610493
next reply other threads:[~2010-10-04 9:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 9:21 Ævar Arnfjörð Bjarmason [this message]
2010-10-04 9:35 ` [PATCH] diff: "S_IFREG | 0644" to "(S_IFREG | 0644)" to avoid warning Jonathan Nieder
2010-10-04 9:47 ` Ævar Arnfjörð Bjarmason
2010-10-04 17:54 ` Junio C Hamano
2010-10-04 18:10 ` [PATCH v2] cache.h: work around broken NetBSD system headers Ævar Arnfjörð Bjarmason
2010-10-04 9:42 ` [PATCH] diff: "S_IFREG | 0644" to "(S_IFREG | 0644)" to avoid warning Ævar Arnfjörð Bjarmason
2010-10-04 10:35 ` Jonathan Nieder
2010-10-04 10:50 ` Jonathan Nieder
2010-10-04 10:53 ` René Scharfe
2010-10-04 11:45 ` Matthieu Moy
2010-10-04 19:23 ` Junio C Hamano
2010-10-04 21:11 ` René Scharfe
2010-10-04 12:28 ` yj2133011
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=1286184071-28457-1-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=dmcmahill@NetBSD.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).