Index: src/libbu/affinity.c
===================================================================
--- src/libbu/affinity.c	(revision 59281)
+++ src/libbu/affinity.c	(working copy)
@@ -68,7 +68,7 @@
 
     /* Clear CPU set and assign our number */
     CPU_ZERO(&set_of_cpus);
-    CPU_SET(cpu & bu_avail_cpus(), &set_of_cpus);
+    CPU_SET((unsigned)(cpu & bu_avail_cpus()), &set_of_cpus);
 
     /* set affinity mask of current thread */
     ret = pthread_setaffinity_np(pthread_self(), sizeof(set_of_cpus), &set_of_cpus);
Index: src/libbu/avs.c
===================================================================
--- src/libbu/avs.c	(revision 59281)
+++ src/libbu/avs.c	(working copy)
@@ -49,7 +49,7 @@
     if (UNLIKELY(len <= 0))
 	len = AVS_ALLOCATION_INCREMENT + AVS_ALLOCATION_INCREMENT;
     avsp->count = 0;
-    avsp->max = len;
+    avsp->max = (unsigned)len;
     avsp->readonly_min = avsp->readonly_max = NULL;
     avsp->avp = (struct bu_attribute_value_pair *)bu_calloc(avsp->max, sizeof(struct bu_attribute_value_pair), str);
 }
Index: src/libbu/backtrace.c
===================================================================
--- src/libbu/backtrace.c	(revision 59281)
+++ src/libbu/backtrace.c	(working copy)
@@ -161,7 +161,7 @@
     }
 
     FD_ZERO(&fdset);
-    FD_SET(output[0], &fdset);
+    FD_SET((unsigned) output[0], &fdset);
 
     if (write(input[1], "set prompt\n", 12) != 12) {
 	perror("write [set prompt] failed");
@@ -197,7 +197,7 @@
 	    break;
 	}
 
-	if ((result > 0) && (FD_ISSET(output[0], &readset))) {
+	if ((result > 0) && (FD_ISSET((unsigned)output[0], &readset))) {
 	    if (read(output[0], &c, 1)) {
 		switch (c) {
 		    case '\n':
Index: src/libbu/bitv.c
===================================================================
--- src/libbu/bitv.c	(revision 59281)
+++ src/libbu/bitv.c	(working copy)
@@ -135,7 +135,7 @@
 
     out = ov->bits;
     in = iv->bits;
-    words = BU_BITS2WORDS(iv->nbits);
+    words = BU_BITS2WORDS((int)iv->nbits);
 #ifdef VECTORIZE
     for (--words; words >= 0; words--)
 	out[words] |= in[words];
@@ -158,7 +158,7 @@
 
     out = ov->bits;
     in = iv->bits;
-    words = BU_BITS2WORDS(iv->nbits);
+    words = BU_BITS2WORDS((int)iv->nbits);
 #ifdef VECTORIZE
     for (--words; words >= 0; words--)
 	out[words] &= in[words];
@@ -179,7 +179,7 @@
     BU_CK_VLS(v);
     BU_CK_BITV(bv);
 
-    len = bv->nbits;
+    len = (int)bv->nbits;
 
     bu_vls_strcat(v, "(");
 
@@ -245,7 +245,7 @@
     char abyte[3];
     const char *str_start;
     unsigned int len=0;
-    int bytes;
+    unsigned int bytes;
     struct bu_bitv *bv;
     unsigned long c;
     size_t word_count;
@@ -263,7 +263,7 @@
     while (isxdigit((int)(*str)))
 	str++;
 
-    len = str - str_start;
+    len = (unsigned)(str - str_start);
 
     if (len < 2 || len % 2) {
 	/* Must be two digits per byte */
@@ -294,7 +294,7 @@
 	    c = strtoul(abyte, (char **)NULL, 16);
 
 	    /* set the appropriate bits in the bit vector */
-	    bv->bits[word_count] |= (bitv_t)c<<(chunksize*8);
+	    bv->bits[word_count] |= (bitv_t)(c<<(chunksize*8));
 	}
 	chunksize = (unsigned int)BVS;
     }
Index: src/libbu/color.c
===================================================================
--- src/libbu/color.c	(revision 59281)
+++ src/libbu/color.c	(working copy)
@@ -143,7 +143,7 @@
 	if (NEAR_ZERO(hue - 360.0, SMALL_FASTF))
 	    hue = 0.0;
 	hue /= 60.0;
-	hue_int = floor((double) hue);
+	hue_int = lrint(floor((double) hue));
 	hue_frac = hue - hue_int;
 	p = val * (1.0 - sat);
 	q = val * (1.0 - (sat * hue_frac));
@@ -162,9 +162,9 @@
 	}
     }
 
-    rgb[RED] = float_rgb[RED] * 255;
-    rgb[GRN] = float_rgb[GRN] * 255;
-    rgb[BLU] = float_rgb[BLU] * 255;
+    rgb[RED] = (unsigned char)lrint(float_rgb[RED] * 255);
+    rgb[GRN] = (unsigned char)lrint(float_rgb[GRN] * 255);
+    rgb[BLU] = (unsigned char)lrint(float_rgb[BLU] * 255);
 
     return 1;
 }
@@ -192,7 +192,7 @@
 	if (num == 1) {
 	    sscanf(str, "%d %d %d", &r, &g, &b);
 	}
-	VSET(rgb, r, g, b);
+	VSET(rgb, (unsigned char)r, (unsigned char)g, (unsigned char)b);
 	if ((r < 0) || (r > 255)
 	    || (g < 0) || (g > 255)
 	    || (b < 0) || (b > 255)) {
@@ -202,7 +202,7 @@
 	return 0;
     }
 
-    VSET(rgb, r, g, b);
+    VSET(rgb, (unsigned char)r, (unsigned char)g, (unsigned char)b);
     return 1;
 }
 
Index: src/libbu/convert.c
===================================================================
--- src/libbu/convert.c	(revision 59281)
+++ src/libbu/convert.c	(working copy)
@@ -248,9 +248,11 @@
 bu_cv(genptr_t out, char *outfmt, size_t size, genptr_t in, char *infmt, int count)
 {
     int incookie, outcookie;
+    size_t ret;
     incookie = bu_cv_cookie(infmt);
     outcookie = bu_cv_cookie(outfmt);
-    return bu_cv_w_cookie(out, outcookie, size, in, incookie, count);
+    ret = bu_cv_w_cookie(out, outcookie, size, in, incookie, (size_t) count);
+    return ret;
 }
 
 
@@ -304,11 +306,11 @@
     size_t limit;
     register size_t i;
 
-    limit = (int)(size / sizeof(signed short));
+    limit = (size / sizeof(signed short));
     if (limit < count) count = limit;
 
     for (i=0; i<count; i++) {
-	*out++ = ((signed char *)in)[0] << 8 | ((unsigned char *)in)[1];
+	*out++ = (short)(((signed char *)in)[0] << 8 | ((unsigned char*)in)[1]);
 	/* XXX This needs sign extension here for the case of
 	 * XXX a negative 2-byte input on a 4 or 8 byte machine.
 	 * XXX The "signed char" trick isn't enough.
@@ -326,12 +328,12 @@
     size_t limit;
     register size_t i;
 
-    limit = (int)(size / sizeof(unsigned short));
+    limit = (size / sizeof(unsigned short));
     if (limit < count) count = limit;
 
     for (i=0; i<count; i++) {
-	*out++ = ((unsigned char *)in)[0]<<8 |
-	    ((unsigned char *)in)[1];
+	*out++ = (short unsigned)((((unsigned char *)in)[0]<<8) |
+	((unsigned char *)in)[1]);
 	in = ((char *)in) + 2;
     }
     return count;
@@ -344,7 +346,7 @@
     size_t limit;
     register size_t i;
 
-    limit = (int)(size / sizeof(signed long int));
+    limit = (size / sizeof(signed long int));
     if (limit < count) count = limit;
 
     for (i=0; i<count; i++) {
@@ -366,7 +368,7 @@
     size_t limit;
     register size_t i;
 
-    limit = (int)(size / sizeof(unsigned long int));
+    limit = (size / sizeof(unsigned long int));
     if (limit < count) count = limit;
 
     for (i=0; i<count; i++) {
@@ -389,12 +391,12 @@
     register unsigned char *cp = (unsigned char *)out;
     register int val;
 
-    limit = (int)(size / 2);
+    limit = (size / 2);
     if (count > limit)  count = limit;
 
     for (i=0; i<count; i++) {
-	*cp++ = (val = *in++)>>8;
-	*cp++ = val;
+	*cp++ = (unsigned char)((val = *in++)>>8);
+	*cp++ = (unsigned char)val;
     }
     return count;
 }
@@ -408,12 +410,12 @@
     register unsigned char *cp = (unsigned char *)out;
     register int val;
 
-    limit = (int)(size / 2);
+    limit = (size / 2);
     if (count > limit)  count = limit;
 
     for (i=0; i<count; i++) {
-	*cp++ = (val = *in++)>>8;
-	*cp++ = val;
+	*cp++ = (unsigned char)((val = *in++)>>8);
+	*cp++ = (unsigned char)val;
     }
     return count;
 }
@@ -427,14 +429,14 @@
     register unsigned char *cp = (unsigned char *)out;
     register long val;
 
-    limit = (int)(size / 4);
+    limit = (size / 4);
     if (count > limit)  count = limit;
 
     for (i=0; i<count; i++) {
-	*cp++ = (val = *in++)>>24;
-	*cp++ = val>>16;
-	*cp++ = val>> 8;
-	*cp++ = val;
+	*cp++ = (unsigned char)((val = (int)*in++)>>24);
+	*cp++ = (unsigned char)(val>>16);
+	*cp++ = (unsigned char)(val>> 8);
+	*cp++ = (unsigned char)val;
     }
     return count;
 }
@@ -448,16 +450,16 @@
     register unsigned char *cp = (unsigned char *)out;
     register long val;
 
-    limit = (int)(size / 4);
+    limit = (size / 4);
     if (count > limit) {
 	count = limit;
     }
 
     for (i=0; i<count; i++) {
-	*cp++ = (val = *in++)>>24;
-	*cp++ = val>>16;
-	*cp++ = val>> 8;
-	*cp++ = val;
+	*cp++ = (unsigned char)((val = (int)*in++)>>24);
+	*cp++ = (unsigned char)(val>>16);
+	*cp++ = (unsigned char)(val>>8);
+	*cp++ = (unsigned char)val;
     }
     return count;
 }
@@ -468,7 +470,8 @@
 {
     size_t work_count = 4096;
     size_t number_done = 0;
-    int inIsHost, outIsHost, infmt, outfmt, insize, outsize;
+    int inIsHost, outIsHost, infmt, outfmt;
+    size_t insize, outsize;
     size_t bufsize;
     genptr_t t1, t2, t3;
     genptr_t from;
@@ -499,8 +502,8 @@
     /*
      * Find the number of bytes required for one item of each kind.
      */
-    outsize = bu_cv_itemlen(outcookie);
-    insize = bu_cv_itemlen(incookie);
+    outsize = (size_t)bu_cv_itemlen(outcookie);
+    insize = (size_t)bu_cv_itemlen(incookie);
 
     /*
      * If the input format is the same as the output format then the
@@ -520,7 +523,7 @@
 	     * remaining before doing the memmove.
 	     */
 	    if ((unsigned int)count * outsize > size) {
-		number_done = (int)(size / outsize);
+		number_done = (size / outsize);
 	    } else {
 		number_done = count;
 	    }
@@ -605,7 +608,7 @@
 	/*
 	 * Get number of full entries that can be converted
 	 */
-	remaining = (int)(size / outsize);
+	remaining = (size_t)(size / outsize);
 
 	/*
 	 * If number of entries that would fit in the output buffer is
@@ -634,7 +637,7 @@
 	 * each, so we set the in pointer to be ready for the next
 	 * time through the loop.
 	 */
-	in = ((char *) in) + work_count * insize;
+	in = (void *)((size_t)((char *) in) + (size_t)work_count * (size_t)insize);
 
 	/*
 	 * If the input is in net format convert it to host format.
@@ -767,7 +770,7 @@
 	    switch (outcookie & (CV_SIGNED_MASK | CV_TYPE_MASK)) {
 		case CV_SIGNED_MASK | CV_8:
 		    for (i=0; i<work_count; i++) {
-			*((signed char *)to) = *((double *)from);
+			*((signed char *)to) = (signed char)*((double *)from);
 			to = (genptr_t)(((signed char *)to) + 1);
 			from = (genptr_t)(((double *)from) + 1);
 		    }
@@ -783,7 +786,7 @@
 		case CV_SIGNED_MASK | CV_16:
 		    for (i=0; i<work_count; i++) {
 			*((signed short int *)to) =
-			    *((double *)from);
+			    (short int)(*((double *)from));
 			to = (genptr_t)(((signed short int *)to) + 1);
 			from = (genptr_t)(((double *)from) + 1);
 		    }
@@ -791,7 +794,7 @@
 		case CV_16:
 		    for (i=0; i<work_count; i++) {
 			*((unsigned short int *)to) =
-			    *((double *)from);
+			    (unsigned short int)(*((double *)from));
 			to = (genptr_t)(((unsigned short int *)to) + 1);
 			from = (genptr_t)(((double *)from) + 1);
 		    }
@@ -799,7 +802,7 @@
 		case CV_SIGNED_MASK | CV_32:
 		    for (i=0; i<work_count; i++) {
 			*((signed long int *)to) =
-			    *((double *)from);
+			    (long int)(*((double *)from));
 			to = (genptr_t)(((signed long int *)to) + 1);
 			from = (genptr_t)(((double *)from) + 1);
 		    }
@@ -807,7 +810,7 @@
 		case CV_32:
 		    for (i=0; i<work_count; i++) {
 			*((unsigned long int *)to) =
-			    *((double *)from);
+			    (long unsigned int)(*((double *)from));
 			to = (genptr_t)(((unsigned long int *)to) + 1);
 			from = (genptr_t)(((double *)from) + 1);
 		    }
@@ -855,8 +858,8 @@
 	 * remaining in the output buffer.  Increment the count of
 	 * values converted.
 	 */
-	out = ((char *)out) + work_count * outsize;
-	size -= work_count * outsize;
+	out = (void *)((size_t)((char *)out) + (size_t)work_count * (size_t)outsize);
+	size -= (size_t)work_count * (size_t)outsize;
 	number_done += work_count;
     }
     /*
Index: src/libbu/fgets.c
===================================================================
--- src/libbu/fgets.c	(revision 59281)
+++ src/libbu/fgets.c	(working copy)
@@ -63,7 +63,7 @@
 	    break;
 	}
 
-	s[totBytesRead++] = c;
+	s[totBytesRead++] = (char)c;
 
 	/* check for newline */
 	if (c == '\n') {
Index: src/libbu/file.c
===================================================================
--- src/libbu/file.c	(revision 59281)
+++ src/libbu/file.c	(working copy)
@@ -334,7 +334,7 @@
 #if defined(HAVE__FSEEKI64) && defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
     ret = _fseeki64(stream, offset, origin);
 #else
-    ret = fseek(stream, offset, origin);
+    ret = fseek(stream, (long int)offset, origin);
 #endif
 
     return ret;
Index: src/libbu/fnmatch.c
===================================================================
--- src/libbu/fnmatch.c	(revision 59281)
+++ src/libbu/fnmatch.c	(working copy)
@@ -217,7 +217,7 @@
 	c = *pattern++; /* next */
     }
     c = *pattern++;
-    bu_vls_strncpy(&classname, pattern-counter-2, counter);
+    bu_vls_strncpy(&classname, pattern-counter-2, (size_t)counter);
 
     ctclass = findclass(bu_vls_addr(&classname));
     if (ctclass == NULL) {
Index: src/libbu/hash.c
===================================================================
--- src/libbu/hash.c	(revision 59281)
+++ src/libbu/hash.c	(working copy)
@@ -36,7 +36,7 @@
 
     for (i=0; i<len; i++) {
 	c = *str;
-	hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+	hash = ((hash << 5) + hash) + (long unsigned)c; /* hash * 33 + c */
 	str++;
     }
 
Index: src/libbu/heap.c
===================================================================
--- src/libbu/heap.c	(revision 59281)
+++ src/libbu/heap.c	(working copy)
@@ -110,7 +110,7 @@
     size_t misses = 0;
     size_t got = 0;
     size_t total_pages = 0;
-    size_t ncpu = bu_avail_cpus();
+    size_t ncpu = (size_t)bu_avail_cpus();
 
     bu_heap_func_t log = bu_heap_log(NULL);
 
Index: src/libbu/hist.c
===================================================================
--- src/libbu/hist.c	(revision 59281)
+++ src/libbu/hist.c	(working copy)
@@ -59,7 +59,7 @@
 
     histp->hg_min = floor(min);
     histp->hg_max = ceil(max);
-    histp->hg_nbins = nbins;
+    histp->hg_nbins = (signed)nbins;
 
     histp->hg_clumpsize = ((max-min)/nbins);
     if (histp->hg_clumpsize <= 0)  histp->hg_clumpsize = 1;
@@ -81,11 +81,11 @@
     if (low <= hp->hg_min)
 	a = 0;
     else
-	a = (low - hp->hg_min) / hp->hg_clumpsize;
+	a = lrint((low - hp->hg_min) / hp->hg_clumpsize);
     if (high >= hp->hg_max)
 	b = hp->hg_nbins-1;
     else
-	b = (high - hp->hg_min) / hp->hg_clumpsize;
+	b = lrint((high - hp->hg_min) / hp->hg_clumpsize);
     if (b >= hp->hg_nbins)  b = hp->hg_nbins-1;
 
     for (i=a; i <= b; i++) {
@@ -145,7 +145,7 @@
     }
     for (; i <= nbins; i++) {
 	percent = (int)(((double)histp->hg_bins[i])*100.0/maxcount);
-	mark_count = percent*NMARKS/100;
+	mark_count = (unsigned)percent*NMARKS/100;
 	if (mark_count <= 0 && histp->hg_bins[i] > 0)
 	    mark_count = 1;
 	if (mark_count > NMARKS) {
Index: src/libbu/log.c
===================================================================
--- src/libbu/log.c	(revision 59281)
+++ src/libbu/log.c	(working copy)
@@ -213,7 +213,7 @@
 
 	if (LIKELY(stderr != NULL)) {
 	    bu_semaphore_acquire(BU_SEM_SYSCALL);
-	    ret = fwrite(bu_vls_addr(&output), len, 1, stderr);
+	    ret = (int)fwrite(bu_vls_addr(&output), len, 1, stderr);
 	    fflush(stderr);
 	    bu_semaphore_release(BU_SEM_SYSCALL);
 	}
@@ -221,7 +221,7 @@
 	if (UNLIKELY(!ret && stdout)) {
 	    /* if stderr fails, try stdout instead */
 	    bu_semaphore_acquire(BU_SEM_SYSCALL);
-	    ret = fwrite(bu_vls_addr(&output), len, 1, stdout);
+	    ret = (int)fwrite(bu_vls_addr(&output), len, 1, stdout);
 	    fflush(stdout);
 	    bu_semaphore_release(BU_SEM_SYSCALL);
 	}
@@ -264,9 +264,9 @@
 	size_t len;
 
 	len = bu_vls_strlen(&output);
-	if (LIKELY(len)) {
+	if (LIKELY((int)len)) {
 	    bu_semaphore_acquire(BU_SEM_SYSCALL);
-	    ret = fwrite(bu_vls_addr(&output), len, 1, fp);
+	    ret = (int)fwrite(bu_vls_addr(&output), len, 1, fp);
 	    bu_semaphore_release(BU_SEM_SYSCALL);
 
 	    if (UNLIKELY(ret != 1))
Index: src/libbu/mappedfile.c
===================================================================
--- src/libbu/mappedfile.c	(revision 59281)
+++ src/libbu/mappedfile.c	(working copy)
@@ -183,13 +183,13 @@
     if (appl) mp->appl = bu_strdup(appl);
 
 #ifdef HAVE_SYS_STAT_H
-    mp->buflen = sb.st_size;
-    mp->modtime = sb.st_mtime;
+    mp->buflen = (size_t)sb.st_size;
+    mp->modtime = (time_t)sb.st_mtime;
 #  ifdef HAVE_SYS_MMAN_H
 
     /* Attempt to access as memory-mapped file */
     bu_semaphore_acquire(BU_SEM_SYSCALL);
-    mp->buf = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+    mp->buf = mmap(NULL, (size_t)sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
     bu_semaphore_release(BU_SEM_SYSCALL);
 
     if (UNLIKELY(mp->buf == MAP_FAILED))
@@ -205,13 +205,13 @@
 	/* Allocate a local zero'd buffer, and slurp it in always
 	 * leaving space for a trailing zero.
 	 */
-	mp->buf = bu_calloc(1, sb.st_size+1, real_path);
+	mp->buf = bu_calloc(1, (size_t)sb.st_size+1, real_path);
 
 	nbytes = 0;
-	bytes_to_go = sb.st_size;
+	bytes_to_go = (ssize_t)sb.st_size;
 	bu_semaphore_acquire(BU_SEM_SYSCALL);
 	while (nbytes < sb.st_size) {
-	    readval = read(fd, ((char *)(mp->buf)) + nbytes, ((bytes_to_go > INT_MAX) ? (INT_MAX) : (bytes_to_go)));
+	    readval = read(fd, ((char *)(mp->buf)) + nbytes, (size_t)((bytes_to_go > INT_MAX) ? (INT_MAX) : (bytes_to_go)));
 	    if (UNLIKELY(readval < 0)) {
 		bu_semaphore_release(BU_SEM_SYSCALL);
 		perror(real_path);
Index: src/libbu/mread.c
===================================================================
--- src/libbu/mread.c	(revision 59281)
+++ src/libbu/mread.c	(working copy)
@@ -36,7 +36,7 @@
     char *cbufp = (char *)bufp;
 
     while (count < n) {
-	nread = read(fd, cbufp, (size_t)n-count);
+	nread = read(fd, cbufp, (size_t)n-(size_t)count);
 	if (UNLIKELY(nread < 0)) {
 	    return nread;
 	}
Index: src/libbu/parallel.c
===================================================================
--- src/libbu/parallel.c	(revision 59281)
+++ src/libbu/parallel.c	(working copy)
@@ -472,7 +472,7 @@
     if (libbu_affinity)
 	affinity = (int)strtol(libbu_affinity, NULL, 0x10);
 
-    user_thread_data_bu = (struct thread_data *)bu_calloc(ncpu, sizeof(*user_thread_data_bu), "struct thread_data *user_thread_data_bu");
+    user_thread_data_bu = (struct thread_data *)bu_calloc((size_t)ncpu, sizeof(*user_thread_data_bu), "struct thread_data *user_thread_data_bu");
 
     /* Fill in the data of user_thread_data_bu structures of all threads */
     for(x = 0; x < ncpu; x++) {
Index: src/libbu/parse.c
===================================================================
--- src/libbu/parse.c	(revision 59281)
+++ src/libbu/parse.c	(working copy)
@@ -38,9 +38,9 @@
 
 #define CKMEM(_len) {							\
 	register ssize_t offset;					\
-	if ((offset = (ep - cp) - (_len)) < 0) {			\
+	if ((offset = ((size_t)ep - (size_t)cp) - (unsigned)(_len)) < 0) {        \
 	    do {							\
-		offset += ext->ext_nbytes;	/* decr by new growth */ \
+		offset += (ssize_t)ext->ext_nbytes;	/* decr by new growth */ \
 		ext->ext_nbytes <<= 1;					\
 	    } while (offset < 0);					\
 	    offset = cp - (char *)ext->ext_buf;				\
@@ -750,7 +750,7 @@
 		    register const char *pv = value;
 
 		    for (i = 0; i < sdp->sp_count && *pv; ++i) {
-			tmpi = atoi(pv);
+			tmpi = (short)atoi(pv);
 
 			cp = pv;
 			if (*cp && (*cp == '+' || *cp == '-'))
@@ -1425,7 +1425,7 @@
 	snprintf(cp, increase, "%s%s=%.27G", (vls->vls_len?" ":""), name, *dp++);
     }
     tmpi = (int)strlen(cp);
-    vls->vls_len += tmpi;
+    vls->vls_len += (size_t)tmpi;
 
     while (--count > 0) {
 	cp += tmpi;
@@ -1436,7 +1436,7 @@
 	    sprintf(cp, "%c%.27G", COMMA, *dp++);
 	}
 	tmpi = (int)strlen(cp);
-	vls->vls_len += tmpi;
+	vls->vls_len += (size_t)tmpi;
     }
 }
 
@@ -1510,7 +1510,7 @@
 				 (vls->vls_len?" ":""),
 				 sdp->sp_name,
 				 *loc);
-		    vls->vls_len += (int)strlen(cp);
+		    vls->vls_len += (size_t)strlen(cp);
 		} else {
 		    struct bu_vls tmpstr = BU_VLS_INIT_ZERO;
 
@@ -1547,13 +1547,13 @@
 			     (vls->vls_len?" ":""),
 			     sdp->sp_name, *sp++);
 		    tmpi = (int)strlen(cp);
-		    vls->vls_len += tmpi;
+		    vls->vls_len += (size_t)tmpi;
 
 		    while (--i > 0) {
 			cp += tmpi;
 			sprintf(cp, "%c%d", COMMA, *sp++);
 			tmpi = (int)strlen(cp);
-			vls->vls_len += tmpi;
+			vls->vls_len += (size_t)tmpi;
 		    }
 		}
 		break;
@@ -1848,7 +1848,7 @@
 		while (*iptr && *iptr != '=')
 		    iptr++;
 
-		bu_vls_strncat(vls, start, iptr - start);
+		bu_vls_strncat(vls, start, (size_t)iptr - (size_t)start);
 
 		/* add a single space after keyword */
 		bu_vls_putc(vls, ' ');
@@ -1884,7 +1884,7 @@
 		while (*iptr && *iptr != ';' && !isspace((int)(*iptr)))
 		    iptr++;
 
-		bu_vls_strncat(vls, start, iptr - start);
+		bu_vls_strncat(vls, start, (size_t)iptr - (size_t)start);
 
 		if (*iptr) {
 		    /* more to come */
@@ -2012,7 +2012,7 @@
 	    return 0;
 	}
 
-	bu_vls_strncat(vls, shader, shader_name_len);
+	bu_vls_strncat(vls, shader, (size_t)shader_name_len);
 
 	/* skip more white space */
 	while (*iptr && isspace((int)(*iptr)))
@@ -2049,7 +2049,7 @@
 		if (bu_vls_strlen(vls) > len) {
 		    bu_vls_putc(vls, '}');
 		} else {
-		    bu_vls_trunc(vls, len - 2);
+		    bu_vls_trunc(vls, (int)len - 2);
 		}
 	    }
 	} else if (*iptr && *iptr == ';') {
@@ -2153,7 +2153,7 @@
     }
 
     len = end - start + 1;
-    bu_vls_strncpy(&out, start, len);
+    bu_vls_strncpy(&out, start, (size_t)len);
 
     ret = bu_vls_strdup(&out);
     bu_vls_free(&out);
@@ -2659,7 +2659,7 @@
 					  sdp->sp_name);
 			    return BRLCAD_ERROR;
 			} else {
-			    *(sh++) = tmpi;
+			    *(sh++) = (short)tmpi;
 			}
 			BU_SP_SKIP_SEP(cp);
 		    }
Index: src/libbu/rb_insert.c
===================================================================
--- src/libbu/rb_insert.c	(revision 59281)
+++ src/libbu/rb_insert.c	(working copy)
@@ -254,7 +254,7 @@
 	    RB_PARENT(node, order) =
 		RB_LEFT_CHILD(node, order) =
 		RB_RIGHT_CHILD(node, order) = RB_NULL(tree);
-	    RB_SET_COLOR(node, order, RB_BLK);
+	    RB_SET_COLOR(node, order, (char)RB_BLK);
 	    RB_SIZE(node, order) = 1;
 	    if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
 		bu_log("bu_rb_insert(<%p>, <%p>, <%p>): size(%p, %d)=%d\n",
Index: src/libbu/sort.c
===================================================================
--- src/libbu/sort.c	(revision 59281)
+++ src/libbu/sort.c	(working copy)
@@ -173,11 +173,11 @@
     pn = (char *)array + nummemb * sizememb;
     r = MIN(pa - (char *)array, pb - pa);
     VECSWAP((char *)array, pb - r, r);
-    r = MIN(pd - pc, (signed) (pn - pd - sizememb));
+    r = MIN(pd - pc, (signed) (pn - pd - (int)sizememb));
     VECSWAP(pb, pn - r, r);
-    if ((r = pb - pa) > sizememb)
+    if ((r = (size_t)(pb - pa)) > sizememb)
         bu_sort(array, r / sizememb, sizememb, compare, context);
-    if ((r = pd - pc) > sizememb) {
+    if ((r = (size_t)(pd - pc)) > sizememb) {
         /* Iterate rather than recurse to save stack space */
         array = pn - r;
         nummemb = r / sizememb;
Index: src/libbu/sscanf.c
===================================================================
--- src/libbu/sscanf.c	(revision 59281)
+++ src/libbu/sscanf.c	(working copy)
@@ -306,7 +306,7 @@
 		/* FALLTHROUGH */
 	    case '1': case '2': case '3': case '4':
 	    case '5': case '6': case '7': case '8': case '9':
-		width = (width * 10) + NUMERIC_CHAR_TO_INT(c);
+		width = (width * 10) + (size_t)NUMERIC_CHAR_TO_INT(c);
 		goto again;
 
 
@@ -342,7 +342,7 @@
 		 * implementations, and there is varying support for E/F/G.
 		 * Replace all with the most portable 'f' variant.
 		 */
-		bu_vls_trunc(&partFmt, bu_vls_strlen(&partFmt) - 1);
+		bu_vls_trunc(&partFmt, (int)bu_vls_strlen(&partFmt) - 1);
 		bu_vls_putc(&partFmt, 'f');
 		c = CT_FLOAT;
 		break;
@@ -404,9 +404,9 @@
 		 * int pointer was provided.
 		 */
 		if (flags & SHORTSHORT) {
-		    *va_arg(ap, char *) = numCharsConsumed;
+		    *va_arg(ap, char *) = (char)numCharsConsumed;
 		} else if (flags & SHORT) {
-		    *va_arg(ap, short *) = numCharsConsumed;
+		    *va_arg(ap, short *) = (short)numCharsConsumed;
 		} else if (flags & LONG) {
 		    *va_arg(ap, long *) = numCharsConsumed;
 		} else if (flags & LONGLONG) {
@@ -414,7 +414,7 @@
 		} else if (flags & INTMAXT) {
 		    *va_arg(ap, intmax_t *) = numCharsConsumed;
 		} else if (flags & SIZET) {
-		    *va_arg(ap, size_t *) = numCharsConsumed;
+		    *va_arg(ap, size_t *) = (size_t)numCharsConsumed;
 		} else if (flags & PTRDIFFT) {
 		    *va_arg(ap, ptrdiff_t *) = numCharsConsumed;
 		} else {
@@ -474,7 +474,7 @@
 		     */
 		    if (isspace((int)(*bu_vls_addr(&partFmt))) || flags & ALTERNATE) {
 			while (1) {
-			    c = src[numCharsConsumed];
+			    c = (size_t)src[numCharsConsumed];
 			    if (c == '\0' || !isspace(c)) {
 				break;
 			    }
@@ -497,7 +497,7 @@
 		     */
 		    if (flags & SUPPRESS) {
 			for (i = 0; i < width; ++i) {
-			    c = src[numCharsConsumed + i];
+			    c = (size_t)src[numCharsConsumed + (int)i];
 
 			    /* stop at non-matching or EOI */
 			    if (c == '\0') {
@@ -510,7 +510,7 @@
 			}
 		    } else {
 			for (i = 0; i < width; ++i) {
-			    c = src[numCharsConsumed + i];
+			    c = (size_t)src[numCharsConsumed + (int)i];
 
 			    /* stop at non-matching or EOI */
 			    /* stop at non-matching or EOI */
Index: src/libbu/tcl.c
===================================================================
--- src/libbu/tcl.c	(revision 59281)
+++ src/libbu/tcl.c	(working copy)
@@ -227,9 +227,9 @@
 	bu_vls_free(&result);
 	return BRLCAD_ERROR;
     }
-    rgb[0] = rgb_int[0];
-    rgb[1] = rgb_int[1];
-    rgb[2] = rgb_int[2];
+    rgb[0] = (unsigned char)rgb_int[0];
+    rgb[1] = (unsigned char)rgb_int[1];
+    rgb[2] = (unsigned char)rgb_int[2];
 
     bu_rgb_to_hsv(rgb, hsv);
     bu_vls_printf(&result, "%g %g %g", hsv[0], hsv[1], hsv[2]);
Index: src/libbu/vfont.c
===================================================================
--- src/libbu/vfont.c	(revision 59281)
+++ src/libbu/vfont.c	(working copy)
@@ -78,7 +78,7 @@
 	fclose(fp);
 	return VFONT_NULL;
     }
-    magic = _vax_gshort(&header[0*2]) & 0xFFFF;
+    magic = (uint16_t)_vax_gshort(&header[0*2]) & 0xFFFF;
     size = _vax_gshort(&header[1*2]) & 0xFFFF;	/* unsigned short */
 
     if (UNLIKELY(magic != 0436)) {
@@ -92,7 +92,7 @@
     BU_ALLOC(vfp, struct vfont);
     vfp->vf_bits = (char *)bu_malloc((size_t)size, "vfont bits");
     if (fread(vfp->vf_bits, (size_t)size, 1, fp) != 1) {
-	fprintf(stderr, "vfont_get(%s):  bitmap read error\n", fname);
+	fprintf(stderr, "vfont_set(%s):  bitmap read error\n", fname);
 	fclose(fp);
 	bu_free(vfp->vf_bits, "vfont bits");
 	bu_free((char *)vfp, "vfont");
@@ -103,21 +103,21 @@
      * Convert VAX data in header[] and dispatch[] arrays to native
      * machine form.
      */
-    vfp->vf_maxx = _vax_gshort(&header[2*2]);
-    vfp->vf_maxy = _vax_gshort(&header[3*2]);
-    vfp->vf_xtend = _vax_gshort(&header[4*2]);
+    vfp->vf_maxx = (short)_vax_gshort(&header[2*2]);
+    vfp->vf_maxy = (short)_vax_gshort(&header[3*2]);
+    vfp->vf_xtend = (short)_vax_gshort(&header[4*2]);
 
     for (i=0; i<255; i++) {
 	register struct vfont_dispatch *vdp = &(vfp->vf_dispatch[i]);
 	register unsigned char *cp = &dispatch[i*10];
 
-	vdp->vd_addr = _vax_gshort(&cp[0]);
-	vdp->vd_nbytes = _vax_gshort(&cp[2]);
-	vdp->vd_up = SXT(cp[4]);
-	vdp->vd_down = SXT(cp[5]);
-	vdp->vd_left = SXT(cp[6]);
-	vdp->vd_right = SXT(cp[7]);
-	vdp->vd_width = _vax_gshort(&cp[8]);
+	vdp->vd_addr = (short unsigned)_vax_gshort(&cp[0]);
+	vdp->vd_nbytes = (short)_vax_gshort(&cp[2]);
+	vdp->vd_up = (short)SXT(cp[4]);
+	vdp->vd_down = (short)SXT(cp[5]);
+	vdp->vd_left = (short)SXT(cp[6]);
+	vdp->vd_right = (short)SXT(cp[7]);
+	vdp->vd_width = (short)_vax_gshort(&cp[8]);
     }
     fclose(fp);
     return vfp;
Index: src/libbu/vlb.c
===================================================================
--- src/libbu/vlb.c	(revision 59281)
+++ src/libbu/vlb.c	(working copy)
@@ -109,7 +109,7 @@
     }
     vlb->buf = NULL;
     vlb->bufCapacity = 0;
-    vlb->nextByte = -1;
+    vlb->nextByte = (unsigned)-1;
     vlb->magic = 0;
 }
 
Index: src/libbu/vls.c
===================================================================
--- src/libbu/vls.c	(revision 59281)
+++ src/libbu/vls.c	(working copy)
@@ -197,7 +197,7 @@
 
     if (len < 0) {
 	/* now an absolute length */
-	len = vp->vls_len + len;
+	len = (int)vp->vls_len + len;
     }
     if (vp->vls_len <= (size_t)len)
 	return;
@@ -204,8 +204,8 @@
     if (len == 0)
 	vp->vls_offset = 0;
 
-    vp->vls_str[len+vp->vls_offset] = '\0'; /* force null termination */
-    vp->vls_len = len;
+    vp->vls_str[len+(int)vp->vls_offset] = '\0'; /* force null termination */
+    vp->vls_len = (size_t)len;
 }
 
 
@@ -222,8 +222,8 @@
     if (len == 0)
 	vp->vls_offset = 0;
 
-    vp->vls_str[len+vp->vls_offset] = '\0'; /* force null termination */
-    vp->vls_len = len;
+    vp->vls_str[len+(int)vp->vls_offset] = '\0'; /* force null termination */
+    vp->vls_len = (size_t)len;
 }
 
 
@@ -233,14 +233,14 @@
     BU_CK_VLS(vp);
 
     if (len < 0 && (-len) > (ssize_t)vp->vls_offset)
-	len = -vp->vls_offset;
+	len = (int)-vp->vls_offset;
     if ((size_t)len >= vp->vls_len) {
 	bu_vls_trunc(vp, 0);
 	return;
     }
 
-    vp->vls_len -= len;
-    vp->vls_offset += len;
+    vp->vls_len -= (size_t)len;
+    vp->vls_offset += (size_t)len;
 }
 
 
@@ -360,7 +360,7 @@
 
     memcpy(vp->vls_str, s, len);
     vp->vls_str[len] = '\0'; /* force null termination */
-    vp->vls_len = (int)len;
+    vp->vls_len = len;
 }
 
 
@@ -382,7 +382,7 @@
 	bu_vls_extend(vp, (unsigned int)len+1);
 
     memcpy(vp->vls_str +vp->vls_offset + vp->vls_len, s, len+1); /* include null */
-    vp->vls_len += (int)len;
+    vp->vls_len += len;
 }
 
 
@@ -406,7 +406,7 @@
 	bu_vls_extend(vp, (unsigned int)len+1);
 
     memcpy(vp->vls_str + vp->vls_offset + vp->vls_len, s, len);
-    vp->vls_len += (int)len;
+    vp->vls_len += len;
     vp->vls_str[vp->vls_offset + vp->vls_len] = '\0'; /* force null termination */
 }
 
@@ -571,7 +571,7 @@
 	if (got == 0)
 	    break;
 
-	vp->vls_len += got;
+	vp->vls_len += (size_t)got;
 	ret += got;
     }
 
@@ -593,7 +593,7 @@
 
     BU_CK_VLS(vp);
 
-    startlen = bu_vls_strlen(vp);
+    startlen = (int)bu_vls_strlen(vp);
 
     do {
 	bufp = bu_fgets(buffer, BUFSIZ+1, fp);
@@ -620,7 +620,7 @@
     } while (!done);
 
     /* sanity check */
-    endlen = bu_vls_strlen(vp);
+    endlen = (int)bu_vls_strlen(vp);
     if (endlen < startlen)
 	return -1;
 
@@ -689,11 +689,11 @@
 
     if (UNLIKELY(cnt <= 0))
 	return;
-    if (vp->vls_offset + vp->vls_len + cnt+1 >= vp->vls_max)
+    if (vp->vls_offset + vp->vls_len + (size_t)cnt+1 >= vp->vls_max)
 	bu_vls_extend(vp, (unsigned)cnt);
 
     memset(vp->vls_str + vp->vls_offset + vp->vls_len, ' ', (size_t)cnt);
-    vp->vls_len += cnt;
+    vp->vls_len += (size_t)cnt;
 }
 
 
@@ -770,7 +770,7 @@
     /* insert the data at the head of the string */
     memcpy(vp->vls_str+vp->vls_offset, str, len);
 
-    vp->vls_len += (int)len;
+    vp->vls_len += len;
 }
 
 /*
Index: src/libbu/vls_vprintf.c
===================================================================
--- src/libbu/vls_vprintf.c	(revision 59281)
+++ src/libbu/vls_vprintf.c	(working copy)
@@ -459,8 +459,8 @@
 		    f.flags |= PRECISION;
 		}
 		/* all length modifiers below here */
-	    } else if (format_part_status(c) == (VP_VALID | VP_LENGTH_MOD)) {
-		handle_format_part(VP_LENGTH_MOD, &f, c, VP_PRINT);
+	    } else if (format_part_status((char)c) == (VP_VALID | VP_LENGTH_MOD)) {
+		handle_format_part(VP_LENGTH_MOD, &f, (char)c, VP_PRINT);
 	    } else {
 		/* Anything else must be the end of the fmt specifier
 		   (i.e., the conversion specifier)*/
@@ -658,7 +658,7 @@
 		    if (vp) {
 			BU_CK_VLS(vp);
 			if (f.flags & FIELDLEN) {
-			    int stringlen = bu_vls_strlen(vp);
+			    int stringlen = (int)bu_vls_strlen(vp);
 
 			    if (stringlen >= f.fieldlen)
 				bu_vls_strncat(vls, bu_vls_addr(vp), (size_t)f.fieldlen);
@@ -831,13 +831,13 @@
 		bu_vls_strcat(vls, buf);
 		break;
 	    default:
-		if (format_part_status(c) & VP_UNKNOWN) {
+		if (format_part_status((char)c) & VP_UNKNOWN) {
 		    fprintf(stderr, "ERROR: Unknown format character '%c'.\n", c);
-		} else if (format_part_status(c) & VP_OBSOLETE) {
-		    handle_obsolete_format_char(c, VP_PRINT);
+		} else if (format_part_status((char)c) & VP_OBSOLETE) {
+		    handle_obsolete_format_char((char)c, VP_PRINT);
 		} else {
 		    fprintf(stderr, "Unknown format character '%c'.\n", c);
-		    fprintf(stderr, "  Status flags: %x.\n", format_part_status(c));
+		    fprintf(stderr, "  Status flags: %x.\n", format_part_status((char)c));
 		    bu_bomb("ERROR: Shouldn't get here.\n");
 		}
 		/* try to get some kind of output, assume it's an int */
Index: src/libbu/xdr.c
===================================================================
--- src/libbu/xdr.c	(revision 59281)
+++ src/libbu/xdr.c	(working copy)
@@ -43,7 +43,7 @@
     register const unsigned char *p = msgp;
     register uint16_t u;
 
-    u = *p++ << 8;
+    u = (uint16_t)(*p++ << 8);
     return (uint16_t)(u | *p);
 }
 
Index: misc/CMake/BRLCAD_CompilerFlags.cmake
===================================================================
--- misc/CMake/BRLCAD_CompilerFlags.cmake	(revision 59281)
+++ misc/CMake/BRLCAD_CompilerFlags.cmake	(working copy)
@@ -105,6 +105,10 @@
 
   CHECK_C_FLAG(Wbad-function-cast)
 
+  CHECK_C_FLAG(Wdeclaration-after-statement)
+
+  CHECK_C_FLAG(Wconversion)
+
   CHECK_C_FLAG(Wextra)
   CHECK_CXX_FLAG(Wextra)
 
