From: Nathan Scott Date: Mon, 14 Nov 2005 02:47:28 +0000 (+0000) Subject: Fix up compiler warnings/errors for cross-platform builds. X-Git-Tag: v2.8.0~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce8d0b3aded7a012b806288a51d1ce7b06fd3e24;p=thirdparty%2Fxfsprogs-dev.git Fix up compiler warnings/errors for cross-platform builds. Merge of master-melb:xfs-cmds:24382a by kenmcd. --- diff --git a/io/imap.c b/io/imap.c index 73f37d00b..1128f0b64 100644 --- a/io/imap.c +++ b/io/imap.c @@ -22,12 +22,6 @@ #include "init.h" #include "io.h" -#if defined(__sgi__) -# define ino64p ino64_t * -#else -# define ino64p __u64 * -#endif - static cmdinfo_t imap_cmd; int @@ -36,7 +30,7 @@ imap_f(int argc, char **argv) int count; int nent; int i; - __s64 last = 0; + __uint64_t last = 0; xfs_inogrp_t *t; xfs_fsop_bulkreq_t bulkreq; @@ -47,7 +41,7 @@ imap_f(int argc, char **argv) t = malloc(nent * sizeof(*t)); - bulkreq.lastip = (ino64p)&last; + bulkreq.lastip = &last; bulkreq.icount = nent; bulkreq.ubuffer = (void *)t; bulkreq.ocount = &count; diff --git a/quota/quot.c b/quota/quot.c index 300656a06..00cae68b8 100644 --- a/quota/quot.c +++ b/quota/quot.c @@ -139,7 +139,7 @@ quot_bulkstat_mount( { xfs_fsop_bulkreq_t bulkreq; xfs_bstat_t *buf; - __int64_t last = 0; + __uint64_t last = 0; __int32_t count; int i, sts, fsfd; du_t **dp; diff --git a/quota/quota.h b/quota/quota.h index 5646a9c54..f9150879d 100644 --- a/quota/quota.h +++ b/quota/quota.h @@ -76,6 +76,7 @@ enum { /* * Identifier (uid/gid/prid) cache routines */ +#define NMAX 32 extern char *uid_to_name(__uint32_t __uid); extern char *gid_to_name(__uint32_t __gid); extern char *prid_to_name(__uint32_t __prid); diff --git a/quota/report.c b/quota/report.c index 0d6d8d0b3..f9d56de25 100644 --- a/quota/report.c +++ b/quota/report.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "init.h" #include "quota.h" @@ -389,7 +390,7 @@ report_user_mount( uint flags) { struct passwd *u; - char n[MAXNAMELEN]; + char n[NMAX]; uint id; if (upper) { /* identifier range specified */ @@ -427,7 +428,7 @@ report_group_mount( uint flags) { struct group *g; - char n[MAXNAMELEN]; + char n[NMAX]; uint id; if (upper) { /* identifier range specified */ @@ -464,7 +465,7 @@ report_project_mount( uint flags) { fs_project_t *p; - char n[MAXNAMELEN]; + char n[NMAX]; uint id; if (upper) { /* identifier range specified */ diff --git a/quota/util.c b/quota/util.c index 6499c3ef7..ea177b284 100644 --- a/quota/util.c +++ b/quota/util.c @@ -219,12 +219,6 @@ type_to_string( * Identifier caches - user/group/project names/IDs */ -#ifndef UT_NAMESIZE -struct utmp utmp; -#define NMAX (sizeof(utmp.ut_name)) -#else -#define NMAX UT_NAMESIZE -#endif #define NID 4096 #define IDMASK (NID-1)