summaryrefslogtreecommitdiff
path: root/lib/e2p
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@whamcloud.com>2011-06-11 10:58:25 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-06-11 10:58:25 -0400
commitcf5301d7f2c3bbed3d26600335102414cbf0c4ba (patch)
tree42d6f95894583f1ddb507e5a2332b7b2ab6a13e4 /lib/e2p
parent44fe08f1fa1e9a994ff304aa02022c53c9341519 (diff)
downloade2fsprogs-cf5301d7f2c3bbed3d26600335102414cbf0c4ba.tar.gz
misc: clean up compiler warnings
Fix several types of compiler warnings (unused variables/labels), uninitialized variables, etc that are hit with gcc -Wall. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/e2p')
-rw-r--r--lib/e2p/ls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c
index 5e560edd..0f36f405 100644
--- a/lib/e2p/ls.c
+++ b/lib/e2p/ls.c
@@ -383,7 +383,7 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
tm = sb->s_first_error_time;
fprintf(f, "First error time: %s", ctime(&tm));
memset(buf, 0, sizeof(buf));
- strncpy(buf, sb->s_first_error_func,
+ strncpy(buf, (char *)sb->s_first_error_func,
sizeof(sb->s_first_error_func));
fprintf(f, "First error function: %s\n", buf);
fprintf(f, "First error line #: %u\n",
@@ -397,7 +397,7 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
tm = sb->s_last_error_time;
fprintf(f, "Last error time: %s", ctime(&tm));
memset(buf, 0, sizeof(buf));
- strncpy(buf, sb->s_last_error_func,
+ strncpy(buf, (char *)sb->s_last_error_func,
sizeof(sb->s_last_error_func));
fprintf(f, "Last error function: %s\n", buf);
fprintf(f, "Last error line #: %u\n",