svn commit: r246811 - projects/diffused_head/sbin/ipfw

Lawrence Stewart lstewart at FreeBSD.org
Fri Feb 15 00:58:01 UTC 2013


Author: lstewart
Date: Fri Feb 15 00:58:00 2013
New Revision: 246811
URL: http://svnweb.freebsd.org/changeset/base/246811

Log:
  Resolve warning about comparison of differently signed integers.
  
  Reported by:	clang

Modified:
  projects/diffused_head/sbin/ipfw/diffuse_proto.c

Modified: projects/diffused_head/sbin/ipfw/diffuse_proto.c
==============================================================================
--- projects/diffused_head/sbin/ipfw/diffuse_proto.c	Fri Feb 15 00:54:33 2013	(r246810)
+++ projects/diffused_head/sbin/ipfw/diffuse_proto.c	Fri Feb 15 00:58:00 2013	(r246811)
@@ -137,7 +137,8 @@ diffuse_proto_get_info(uint16_t id)
 {
 	int i;
 
-	for (i = 0; i < sizeof(dip_info) / sizeof(struct dip_info_descr); i++) {
+	for (i = 0; i < (int)(sizeof(dip_info) / sizeof(struct dip_info_descr));
+	    i++) {
 		if (dip_info[i].id == id)
 			return (dip_info[i]);
 	}
@@ -197,8 +198,8 @@ diffuse_proto_print_msg(char *buf, struc
 				r->id = s.id;
 
 				while (offs - toffs < ntohs(shdr->set_len) -
-				    sizeof(struct dip_set_header) -
-				    sizeof(struct dip_templ_header)) {
+				    (int)sizeof(struct dip_set_header) -
+				    (int)sizeof(struct dip_templ_header)) {
 					r->fields[r->fcnt].id =
 					    be16dec(buf + offs);
 					offs += sizeof(uint16_t);
@@ -243,7 +244,7 @@ diffuse_proto_print_msg(char *buf, struc
 				cnt = 0;
 
 				while (offs - toffs < ntohs(shdr->set_len) -
-				    sizeof(struct dip_set_header)) {
+				    (int)sizeof(struct dip_set_header)) {
 					if (r->fields[cnt].len == -1) {
 						/* Read dynamic length */
 						dlen =


More information about the svn-src-projects mailing list