linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coly Li <colyli@gmail.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] removing e2fsprogs compiling warnings
Date: Wed, 01 Aug 2007 15:18:04 +0800	[thread overview]
Message-ID: <46B033AC.1070809@gmail.com> (raw)

This patch remove 3 compiling warning of current e2fsprogs git.

Best regards.

Coly



diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
index b50ff7c..ce0301f 100644
--- a/debugfs/set_fields.c
+++ b/debugfs/set_fields.c
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
index 69a43b0..c8fffa1 100644
--- a/lib/blkid/probe.c
+++ b/lib/blkid/probe.c
@@ -585,8 +585,8 @@ static int probe_luks(struct blkid_probe *probe,
        unsigned char uuid[40];
        /* 168 is the offset to the 40 character uuid:
         * http://luks.endorphin.org/LUKS-on-disk-format.pdf */
-       strncpy(uuid, buf+168, 40);
-       blkid_set_tag(probe->dev, "UUID", uuid, sizeof(uuid));
+       strncpy((char *)uuid, (const char *)(buf+168), 40);
+       blkid_set_tag(probe->dev, "UUID", (const char *)uuid, sizeof(uuid));
        return 0;
 }

diff --git a/misc/badblocks.c b/misc/badblocks.c
index 88c5a74..29c5a5c 100644
--- a/misc/badblocks.c
+++ b/misc/badblocks.c
@@ -1012,7 +1012,7 @@ int main (int argc, char ** argv)
                }
        } else from_count = 0;
        if (from_count >= last_block) {
-           com_err (program_name, 0, _("invalid starting block (%d):
must be less than %lu"),
+           com_err (program_name, 0, _("invalid starting block (%lu):
must be less than %lu"),
                     (unsigned long) from_count, (unsigned long)
last_block);
            exit (1);
        }

             reply	other threads:[~2007-08-01  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01  7:18 Coly Li [this message]
2007-08-03 22:32 ` [PATCH] removing e2fsprogs compiling warnings Theodore Tso
2007-08-04  6:07   ` Coly Li
2007-08-04 14:56     ` Theodore Tso
2007-08-05 13:25       ` Coly Li
2007-08-04  6:55   ` Coly Li

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=46B033AC.1070809@gmail.com \
    --to=colyli@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).