From 225e5b77ff65e96b4be1a6be97afd65a2abefc12 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 5 Mar 2011 09:58:17 -0500 Subject: [PATCH] volser: warning removal remove assigning size_t to int warnings when size_t is larger by declaring appropriate variables as size_t. remove signed vs unsigned warnings Change-Id: I998d7b0aa75bc03a6fa872a3628c43ebe08b4f99 Reviewed-on: http://gerrit.openafs.org/4137 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/volser/vos.c | 5 +++-- src/volser/vsutils.c | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/volser/vos.c b/src/volser/vos.c index 90a5ab5..b74e71a 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -170,7 +170,7 @@ FileExists(char *filename) static int VolNameOK(char *name) { - int total; + size_t total; total = strlen(name); @@ -187,7 +187,8 @@ VolNameOK(char *name) static int IsNumeric(char *name) { - int result, len, i; + int result, i; + size_t len; char *ptr; result = 1; diff --git a/src/volser/vsutils.c b/src/volser/vsutils.c index 13c7fd5..80ac482 100644 --- a/src/volser/vsutils.c +++ b/src/volser/vsutils.c @@ -217,7 +217,7 @@ VLDB_ReplaceEntry(afs_uint32 volid, afs_int32 voltype, struct nvldbentry *entryp static void convertBulkToNBulk(bulkentries *bulk, nbulkentries *nbulk) { - int i; + unsigned int i; if (bulk->bulkentries_len == 0) return; @@ -309,7 +309,7 @@ VLDB_ListAttributesN2(VldbListByAttributes *attrp, struct cacheips { afs_uint32 server; - afs_int32 count; + afs_uint32 count; afs_uint32 addrs[16]; }; /* @@ -327,8 +327,8 @@ VLDB_IsSameAddrs(afs_uint32 serv1, afs_uint32 serv2, afs_int32 *errorp) int code; ListAddrByAttributes attrs; bulkaddrs addrs; - afs_uint32 *addrp, i, j, f1, f2; - afs_int32 unique, nentries; + afs_uint32 *addrp, j, f1, f2; + afs_int32 unique, nentries, i; afsUUID uuid; static int initcache = 0; @@ -443,7 +443,7 @@ int vsu_ExtractName(char rname[], char name[]) { char sname[VOLSER_OLDMAXVOLNAME + 1]; - int total; + size_t total; strncpy(sname, name, sizeof(sname)); sname[sizeof(sname) - 1] = '\0'; @@ -472,7 +472,7 @@ vsu_GetVolumeID(char *astring, struct ubik_client *acstruct, afs_int32 *errp) char volname[VOLSER_OLDMAXVOLNAME + 1]; struct nvldbentry entry; afs_int32 vcode = 0; - int total; + size_t total; *errp = 0; -- 1.9.4