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
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 */
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);
}
# 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;
}
* 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))
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;