+2003-04-19 Theodore Ts'o <tytso@mit.edu>
+
+ * rehash.c: Fix lint warnings by including string.h and ctype.h
+
+ * pass2.c (dict_de_cmp): Fix lint warnings by using const pointers.
+
+ * unix.c (e2fsck_simple_progress), e2fsck.h: Fix lint warnings by
+ using const pointers. Remove unused variables.
+
2003-04-17 Theodore Ts'o <tytso@mit.edu>
* rehash.c (name_cmp): Sort the deleted inodes to the end of the
/* unix.c */
extern void e2fsck_clear_progbar(e2fsck_t ctx);
-extern int e2fsck_simple_progress(e2fsck_t ctx, char *label,
+extern int e2fsck_simple_progress(e2fsck_t ctx, const char *label,
float percent, unsigned int dpynum);
static int dict_de_cmp(const void *a, const void *b)
{
- struct ext2_dir_entry *de_a, *de_b;
+ const struct ext2_dir_entry *de_a, *de_b;
int a_len, b_len;
- de_a = (struct ext2_dir_entry *) a;
+ de_a = (const struct ext2_dir_entry *) a;
a_len = de_a->name_len & 0xFF;
- de_b = (struct ext2_dir_entry *) b;
+ de_b = (const struct ext2_dir_entry *) b;
b_len = de_b->name_len & 0xFF;
if (a_len != b_len)
* require that e2fsck use VM first.
*/
+#include <string.h>
+#include <ctype.h>
#include <errno.h>
#include "e2fsck.h"
#include "problem.h"
ctx->flags &= ~E2F_FLAG_PROG_BAR;
}
-int e2fsck_simple_progress(e2fsck_t ctx, char *label, float percent,
+int e2fsck_simple_progress(e2fsck_t ctx, const char *label, float percent,
unsigned int dpynum)
{
static const char spinner[] = "\\|/-";
- char buf[80];
int i;
int tick;
struct timeval tv;
static int e2fsck_update_progress(e2fsck_t ctx, int pass,
unsigned long cur, unsigned long max)
{
- static const char spinner[] = "\\|/-";
char buf[80];
- int i;
float percent;
- int tick;
- struct timeval tv;
- static int dpywidth = 0;
if (pass == 0)
return 0;
+2003-04-19 Theodore Ts'o <tytso@mit.edu>
+
+ * blkidP.h: Fix gcc -Wall warnings by using __inline__ instead of
+ inline.
+
2003-04-02 Theodore Ts'o <tytso@mit.edu>
* probe.c, probe.h: Fix XFS superblock definition. Add support to
#endif
#ifdef CONFIG_BLKID_DEBUG
-static inline void DEB_DUMP_TAG(int mask, blkid_tag tag)
+static __inline__ void DEB_DUMP_TAG(int mask, blkid_tag tag)
{
if (!(mask & blkid_debug_mask))
return;
printf(" tag: %s=\"%s\"\n", tag->bit_name, tag->bit_val);
}
-static inline void DEB_DUMP_DEV(int mask, blkid_dev dev)
+static __inline__ void DEB_DUMP_DEV(int mask, blkid_dev dev)
{
struct list_head *p;
printf("\n");
}
-static inline void DEB_DUMP_CACHE(int mask, blkid_cache cache)
+static __inline__ void DEB_DUMP_CACHE(int mask, blkid_cache cache)
{
struct list_head *p;
+2003-04-19 Theodore Ts'o <tytso@mit.edu>
+
+ * fgetflags.c (fgetflags), fsetflags.c (fsetflags): Remove unused
+ and useless close(fd).
+
+ * hashstr.c (e2p_hash2string): Remove unused variables.
+
+ * iod.c: Fix gcc -Wall warnings by including stdlib.h.
+
2003-04-12 Theodore Ts'o <tytso@mit.edu>
* iod.c (iterate_on_dir): Support systems that don't have d_reclen
if (!stat(name, &buf) &&
!S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
- close(fd);
goto notsupp;
}
fd = open (name, OPEN_FLAGS);
if (!stat(name, &buf) &&
!S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode)) {
- close(fd);
goto notsupp;
}
fd = open (name, OPEN_FLAGS);
{
struct hash *p;
static char buf[20];
- char fchar;
- int fnum;
for (p = hash_list; p->string; p++) {
if (num == p->num)
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#include <stdlib.h>
int iterate_on_dir (const char * dir_name,
int (*func) (const char *, struct dirent *, void *),