Mon Mar 16 11:18:10 2009 UTC ()
fix sign-compare issues


(lukem)
diff -r1.1 -r1.2 src/sbin/amrctl/amrctl.c

cvs diff -r1.1 -r1.2 src/sbin/amrctl/amrctl.c (expand / switch to context diff)
--- src/sbin/amrctl/amrctl.c 2006/07/23 12:01:26 1.1
+++ src/sbin/amrctl/amrctl.c 2009/03/16 11:18:10 1.2
@@ -92,7 +92,7 @@
 
 static struct {
 	const char	*product;
-	const int	signature;
+	const uint32_t	signature;
 } prodtable[] = {
 	{	"Series 431",			AMR_SIG_431	},
 	{	"Series 438",			AMR_SIG_438	},
@@ -212,7 +212,7 @@
 describe_card(int fd, int verbosity, int globalparam)
 {
 	struct amr_enquiry *ae;
-	int	cardtype;
+	uint32_t	cardtype;
 
 	/*
 	 * Try the 40LD firmware interface
@@ -267,7 +267,7 @@
 		if (globalparam) {
 			const char   *product = NULL;
 			char	bios[100], firmware[100];
-			int	i;
+			size_t	i;
 
 			for (i = 0; i < NTAB(prodtable); i++) {
 				if (cardtype == prodtable[i].signature) {
@@ -348,7 +348,7 @@
 char *
 describe_property(u_int8_t prop, char *buffer)
 {
-	int	i;
+	size_t	i;
 
 	strcpy(buffer, "<");
 	for (i = 0; i < NTAB(proptable); i++) {
@@ -367,7 +367,7 @@
 const char *
 describe_state(int verbosity, u_int8_t state)
 {
-	int	i;
+	size_t	i;
 
 	if ((AMR_DRV_PREVSTATE(state) == AMR_DRV_CURSTATE(state)) &&
 	    (AMR_DRV_CURSTATE(state) == AMR_DRV_OFFLINE) && verbosity == 0)
@@ -387,7 +387,7 @@
 describe_battery(int fd, int verbosity, int fwint, int bflags, int globalparam)
 {
 	u_int8_t batt_status;
-	int i;
+	size_t i;
 
 	if (fwint == FIRMWARE_40LD) {
 		enq_result = amr_ioctl_enquiry(fd, AMR_CMD_CONFIG,