* fsinfo/fsi_util.c (set_ether_if), amd/map.c (unmount_mp),
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 7 Oct 2005 18:55:29 +0000 (18:55 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 7 Oct 2005 18:55:29 +0000 (18:55 +0000)
libamu/xutil.c (expand_error), libamu/strutil.c (xsnprintf): avoid
comparison between signed and unsigned integers.

ChangeLog
amd/map.c
fsinfo/fsi_util.c
libamu/mount_fs.c
libamu/strutil.c
libamu/xutil.c

index 99fa8b6ce5e2bbe629381c2d0b269e050871ccfb..85caab5b38f19a36f7476bea43adfd9741402840 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-10-07  Erez Zadok  <ezk@cs.sunysb.edu>
 
+       * fsinfo/fsi_util.c (set_ether_if), amd/map.c (unmount_mp),
+       libamu/xutil.c (expand_error), libamu/strutil.c (xsnprintf): avoid
+       comparison between signed and unsigned integers.
+
        * conf/autofs/autofs_solaris_v1.h, conf/autofs/autofs_solaris_v1.c
        (autofs_strdup_space_hack): move "space_hack" function from static
        inline in header, into the only source file that needs it.  This
index f1993ec4c0a4f1ecce2e78598522a6c786b39710..2c156484a82b7121913202ccbe0c020855622a28 100644 (file)
--- a/amd/map.c
+++ b/amd/map.c
@@ -900,7 +900,7 @@ unmount_mp(am_node *mp)
     time_t last = mp->am_parent->am_attr.ns_u.ns_attr_u.na_mtime.nt_seconds;
     clocktime(&mp->am_parent->am_attr.ns_u.ns_attr_u.na_mtime);
     /* defensive programming... can't we assert the above condition? */
-    if (last == mp->am_parent->am_attr.ns_u.ns_attr_u.na_mtime.nt_seconds)
+    if (last == (time_t) mp->am_parent->am_attr.ns_u.ns_attr_u.na_mtime.nt_seconds)
       mp->am_parent->am_attr.ns_u.ns_attr_u.na_mtime.nt_seconds++;
   }
 #endif /* not MNT2_NFS_OPT_SYMTTL */
index 3167a39d321c52635751e02afbc70663c0120250..1da927d539b601b4c646be53fa4fb851351bca1b 100644 (file)
@@ -451,7 +451,7 @@ set_ether_if(ether_if *ep, int k, char *v)
 
   case EF_INADDR:{
       ep->e_inaddr.s_addr = inet_addr(v);
-      if ((int) ep->e_inaddr.s_addr == INADDR_NONE)
+      if ((int) ep->e_inaddr.s_addr == (int) INADDR_NONE)
        yyerror("malformed IP dotted quad: %s", v);
       XFREE(v);
     }
index 26bfea9fcbcd6861a67f442ac35946223916ee4a..e3b6b846a3431dc7880bf3d3f208b7c56fc21734 100644 (file)
@@ -301,7 +301,7 @@ again:
 #  ifdef HAVE_MNTENT_T_MNT_TIME_STRING
   {                            /* allocate enough space for a long */
     size_t l = 13 * sizeof(char);
-    char *str = (char *) xmalloc(l)
+    char *str = (char *) xmalloc(l);
     xsnprintf(str, l, "%ld", time((time_t *) NULL));
     mnt->mnt_time = str;
   }
index 17ddc7cc22fa494527de73ff6830cc3408c806b8..b63d869585a5b39c8281bc21641a06c2c423fd3d 100644 (file)
@@ -254,7 +254,7 @@ xvsnprintf(char *str, size_t size, const char *format, va_list ap)
    * possible infinite recursion between plog() and xvsnprintf().  If it
    * ever happens, it'd indicate a bug in Amd.
    */
-  if (ret < 0 || ret >= size) { /* error or truncation occured */
+  if (ret < 0 || (size_t) ret >= size) { /* error or truncation occured */
     static int maxtrunc;        /* hack to avoid inifinite loop */
     if (++maxtrunc > 10)
 #if defined(DEBUG) && (defined(HAVE_C99_VARARGS_MACROS) || defined(HAVE_GCC_VARARGS_MACROS))
index 176db0e36282ecc25b5dd4e869fa7e1264c478f9..1320160c4e53ba2a8c805d32a9c638f15ff80eb7 100644 (file)
@@ -297,7 +297,7 @@ expand_error(const char *f, char *e, size_t maxlen)
   int error = errno;
   int len = 0;
 
-  for (p = f, q = e; (*q = *p) && len < maxlen; len++, q++, p++) {
+  for (p = f, q = e; (*q = *p) && (size_t) len < maxlen; len++, q++, p++) {
     if (p[0] == '%' && p[1] == 'm') {
       xstrlcpy(q, strerror(error), maxlen);
       len += strlen(q) - 1;