From: Stephen Hemminger <shemminger@osdl.org>
To: Anton Altaparmakov <aia21@cantab.net>
Cc: linux-ntfs-dev@lists.sourceforge.net,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix warnings for NTFS 2.5.61
Date: 17 Feb 2003 14:49:58 -0800 [thread overview]
Message-ID: <1045522197.12949.94.camel@dell_ss3.pdx.osdl.net> (raw)
This patch gets rid of the following warnings.
fs/ntfs/attrib.c: In function `find_attr':
fs/ntfs/attrib.c:1187: warning: duplicate `const'
fs/ntfs/unistr.c: In function `ntfs_collate_names':
fs/ntfs/unistr.c:102: warning: duplicate `const'
fs/ntfs/unistr.c:102: warning: duplicate `const'
diff -Nru a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
--- a/fs/ntfs/attrib.c Mon Feb 17 14:16:15 2003
+++ b/fs/ntfs/attrib.c Mon Feb 17 14:16:15 2003
@@ -1183,7 +1183,8 @@
register int rc;
rc = memcmp(val, (u8*)a + le16_to_cpu(
- a->_ARA(value_offset)), min(val_len,
+ a->_ARA(value_offset)),
+ min_t(const u32, val_len,
le32_to_cpu(a->_ARA(value_length))));
/*
* If @val collates before the current attribute's
diff -Nru a/fs/ntfs/unistr.c b/fs/ntfs/unistr.c
--- a/fs/ntfs/unistr.c Mon Feb 17 14:16:15 2003
+++ b/fs/ntfs/unistr.c Mon Feb 17 14:16:15 2003
@@ -96,10 +96,10 @@
const int err_val, const IGNORE_CASE_BOOL ic,
const uchar_t *upcase, const u32 upcase_len)
{
- u32 cnt, min_len;
+ u32 cnt;
+ const u32 min_len = min_t(const u32, name1_len, name2_len);
uchar_t c1, c2;
- min_len = min(name1_len, name2_len);
for (cnt = 0; cnt < min_len; ++cnt) {
c1 = le16_to_cpu(*name1++);
c2 = le16_to_cpu(*name2++);
reply other threads:[~2003-02-17 22:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1045522197.12949.94.camel@dell_ss3.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=aia21@cantab.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®