Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
151a716
)
Fix more compiler warnings.
author
Matthias Andree
<matthias.andree@gmx.de>
Sun, 28 Dec 2003 12:04:35 +0000
(13:04 +0100)
committer
Matthias Andree
<matthias.andree@gmx.de>
Sun, 28 Dec 2003 12:04:35 +0000
(13:04 +0100)
e2fsck/journal.c
patch
|
blob
|
history
e2fsck/pass1.c
patch
|
blob
|
history
e2fsck/pass2.c
patch
|
blob
|
history
lib/uuid/tst_uuid.c
patch
|
blob
|
history
misc/mklost+found.c
patch
|
blob
|
history
misc/tune2fs.c
patch
|
blob
|
history
resize/resize2fs.c
patch
|
blob
|
history
tests/progs/test_icount.c
patch
|
blob
|
history
diff --git
a/e2fsck/journal.c
b/e2fsck/journal.c
index
c645f3b
..
7432eed
100644
(file)
--- a/
e2fsck/journal.c
+++ b/
e2fsck/journal.c
@@
-122,10
+122,11
@@
void ll_rw_block(int rw, int nr, struct buffer_head *bhp[])
}
bh->b_dirty = 0;
bh->b_uptodate = 1;
}
bh->b_dirty = 0;
bh->b_uptodate = 1;
- } else
+ } else
{
jfs_debug(3, "no-op %s for block %lu\n",
rw == READ ? "read" : "write",
(unsigned long) bh->b_blocknr);
jfs_debug(3, "no-op %s for block %lu\n",
rw == READ ? "read" : "write",
(unsigned long) bh->b_blocknr);
+ }
}
}
}
}
diff --git
a/e2fsck/pass1.c
b/e2fsck/pass1.c
index
2062807
..
c6e9087
100644
(file)
--- a/
e2fsck/pass1.c
+++ b/
e2fsck/pass1.c
@@
-37,6
+37,7
@@
* found.
*/
* found.
*/
+#define _GNU_SOURCE 1 /* get strnlen() */
#include <string.h>
#include <time.h>
#ifdef HAVE_ERRNO_H
#include <string.h>
#include <time.h>
#ifdef HAVE_ERRNO_H
diff --git
a/e2fsck/pass2.c
b/e2fsck/pass2.c
index
dee2c19
..
c3858ab
100644
(file)
--- a/
e2fsck/pass2.c
+++ b/
e2fsck/pass2.c
@@
-41,6
+41,7
@@
* - The inode_reg_map bitmap
*/
* - The inode_reg_map bitmap
*/
+#define _GNU_SOURCE 1 /* get strnlen() */
#include <string.h>
#include "e2fsck.h"
#include <string.h>
#include "e2fsck.h"
diff --git
a/lib/uuid/tst_uuid.c
b/lib/uuid/tst_uuid.c
index
f1f56f1
..
a9cc191
100644
(file)
--- a/
lib/uuid/tst_uuid.c
+++ b/
lib/uuid/tst_uuid.c
@@
-10,6
+10,7
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include <stdlib.h>
#include "uuid.h"
#include "uuid.h"
@@
-20,7
+21,7
@@
static int test_uuid(const char * uuid, int isValid)
int parsedOk;
parsedOk = uuid_parse(uuid, uuidBits) == 0;
int parsedOk;
parsedOk = uuid_parse(uuid, uuidBits) == 0;
-
+
printf("%s is %s", uuid, validStr[isValid]);
if (parsedOk != isValid) {
printf(" but uuid_parse says %s\n", validStr[parsedOk]);
printf("%s is %s", uuid, validStr[isValid]);
if (parsedOk != isValid) {
printf(" but uuid_parse says %s\n", validStr[parsedOk]);
@@
-78,7
+79,7
@@
main(int argc, char **argv)
failed++;
}
printf("\n");
failed++;
}
printf("\n");
-
+
uuid_generate_time(buf);
uuid_unparse(buf, str);
printf("UUID string = %s\n", str);
uuid_generate_time(buf);
uuid_unparse(buf, str);
printf("UUID string = %s\n", str);
@@
-135,13
+136,10
@@
main(int argc, char **argv)
failed += test_uuid("84949cc5-4701-4a84-895b0354c584a981b", 0);
failed += test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", 0);
failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981g", 0);
failed += test_uuid("84949cc5-4701-4a84-895b0354c584a981b", 0);
failed += test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", 0);
failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981g", 0);
-
+
if (failed) {
printf("%d failures.\n", failed);
exit(1);
}
return 0;
}
if (failed) {
printf("%d failures.\n", failed);
exit(1);
}
return 0;
}
-
-
-
diff --git
a/misc/mklost+found.c
b/misc/mklost+found.c
index
fa77930
..
027c899
100644
(file)
--- a/
misc/mklost+found.c
+++ b/
misc/mklost+found.c
@@
-45,6
+45,7
@@
int main (int argc, char ** argv)
fprintf (stderr, "mklost+found %s (%s)\n", E2FSPROGS_VERSION,
E2FSPROGS_DATE);
if (argc != 1) {
fprintf (stderr, "mklost+found %s (%s)\n", E2FSPROGS_VERSION,
E2FSPROGS_DATE);
if (argc != 1) {
+ (void)argv; /* avoid unused argument warning */
fprintf (stderr, _("Usage: mklost+found\n"));
exit(1);
}
fprintf (stderr, _("Usage: mklost+found\n"));
exit(1);
}
diff --git
a/misc/tune2fs.c
b/misc/tune2fs.c
index
d8c8e2e
..
1e66204
100644
(file)
--- a/
misc/tune2fs.c
+++ b/
misc/tune2fs.c
@@
-25,6
+25,8
@@
* 94/03/06 - Added the checks interval from Uwe Ohse (uwe@tirka.gun.de)
*/
* 94/03/06 - Added the checks interval from Uwe Ohse (uwe@tirka.gun.de)
*/
+#define _XOPEN_SOURCE /* for inclusion of strptime() */
+#define _BSD_SOURCE /* for inclusion of strcasecmp() */
#include <fcntl.h>
#include <grp.h>
#ifdef HAVE_GETOPT_H
#include <fcntl.h>
#include <grp.h>
#ifdef HAVE_GETOPT_H
diff --git
a/resize/resize2fs.c
b/resize/resize2fs.c
index
5aaf8f5
..
b7f2c99
100644
(file)
--- a/
resize/resize2fs.c
+++ b/
resize/resize2fs.c
@@
-34,6
+34,7
@@
*/
#include "resize2fs.h"
*/
#include "resize2fs.h"
+#include <time.h>
#ifdef __linux__ /* Kludge for debugging */
#define RESIZE2FS_DEBUG
#ifdef __linux__ /* Kludge for debugging */
#define RESIZE2FS_DEBUG
diff --git
a/tests/progs/test_icount.c
b/tests/progs/test_icount.c
index
7a364fc
..
9df7cb6
100644
(file)
--- a/
tests/progs/test_icount.c
+++ b/
tests/progs/test_icount.c
@@
-211,11
+211,11
@@
void do_dump(int argc, char **argv)
retval = ext2fs_icount_fetch(test_icount, i, &count);
if (retval) {
com_err(argv[0], retval,
retval = ext2fs_icount_fetch(test_icount, i, &count);
if (retval) {
com_err(argv[0], retval,
- "while fetching icount for %lu", i);
+ "while fetching icount for %lu",
(unsigned long)
i);
return;
}
if (count)
return;
}
if (count)
- printf("%lu: %u\n", i, count);
+ printf("%lu: %u\n",
(unsigned long)
i, count);
}
}
}
}
@@
-236,11
+236,11
@@
void do_validate(int argc, char **argv)
void do_get_size(int argc, char **argv)
{
ext2_ino_t size;
void do_get_size(int argc, char **argv)
{
ext2_ino_t size;
-
+
if (check_icount(argv[0]))
return;
size = ext2fs_get_icount_size(test_icount);
if (check_icount(argv[0]))
return;
size = ext2fs_get_icount_size(test_icount);
- printf("Size of icount is: %lu\n", size);
+ printf("Size of icount is: %lu\n",
(unsigned long)
size);
}
static int source_file(const char *cmd_file, int sci_idx)
}
static int source_file(const char *cmd_file, int sci_idx)