File netdiag-20060324_signedness_warnings.patch of Package netdiag

Index: diag/epic-diag.c
===================================================================
--- diag/epic-diag.c.orig	2005-02-28 04:53:00.000000000 +0100
+++ diag/epic-diag.c	2007-02-16 17:38:49.610580515 +0100
@@ -646,7 +646,7 @@ int epic_diag(int vendor_id, int device_
 			unsigned tx_ctrl = inl(ioaddr + TxCtrl);
 			unsigned last_tx = inl(ioaddr + TxSTAT);
 			unsigned last_rx = inl(ioaddr + 0x64);
-			static unsigned char *tx_mode[4] = {
+			static char *tx_mode[4] = {
 				"half-duplex", "internal loopback",
 				"external loopback", "full-duplex"};
 			printf("  Transmitter: slot time %d bits, %s mode.\n",
Index: diag/ether-wake.c
===================================================================
--- diag/ether-wake.c.orig	2003-12-19 23:31:36.000000000 +0100
+++ diag/ether-wake.c	2007-02-16 17:38:49.710586323 +0100
@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
 	   The code to retrieve the local station address is Linux specific. */
 	if (! opt_no_src_addr) {
 		struct ifreq if_hwaddr;
-		unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
+		char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
 
 		strcpy(if_hwaddr.ifr_name, ifname);
 		if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) {
Index: isa-diag/atp-diag.c
===================================================================
--- isa-diag/atp-diag.c.orig	2007-02-16 17:38:49.562577728 +0100
+++ isa-diag/atp-diag.c	2007-02-16 17:38:49.810592130 +0100
@@ -403,7 +403,7 @@ static void read_block(long ioaddr, int 
 
 static void ram_test(long ioaddr)
 {
-	unsigned char buffer[64];
+	char buffer[64];
 	int failedp = 0;
 	int i;
 	
@@ -432,7 +432,7 @@ static void ram_test(long ioaddr)
 	strcpy(buffer, "BUBBUB");
 #ifdef new
 	outb(EOC+MAR, ioaddr + PAR_DATA);
-	read_block(ioaddr, 8, buffer, 4);
+	read_block(ioaddr, 8, (unsigned char*)buffer, 4);
 	printk(" Compare is %d, '%10.10s' vs '%10.10s'.\n",
 		   memcmp(buffer, version_msg, sizeof version_msg), buffer,
 		   version_msg);
@@ -460,7 +460,7 @@ static void ram_test(long ioaddr)
 	}
 #endif
 
-	read_block(ioaddr, 8, buffer, 4);
+	read_block(ioaddr, 8, (unsigned char*)buffer, 4);
 	printk(" Compare is %d, '%10.10s' vs '%10.10s'.\n",
 		   memcmp(buffer, version_msg, sizeof version_msg), buffer,
 		   version_msg);
Index: isa-diag/at1700-diag.c
===================================================================
--- isa-diag/at1700-diag.c.orig	2005-03-22 01:50:31.000000000 +0100
+++ isa-diag/at1700-diag.c	2007-02-16 17:38:49.830593292 +0100
@@ -607,7 +607,7 @@ void do_multicast_test(long ioaddr)
 			rx_length = rx_packet(ioaddr, rx_buffer);
 			if (rx_length)
 				printf("Flushing Rx frame of length %d.\n", rx_length);
-			send_packet(ioaddr, 60, tx_buffer);
+			send_packet(ioaddr, 60, (char*)tx_buffer);
 			usleep(1000);
 			for (j = 40000; j > 0; j--)
 				if (inb(ioaddr) & 0x80)
Index: isa-diag/ne2k-diag.c
===================================================================
--- isa-diag/ne2k-diag.c.orig	2004-08-03 05:35:33.000000000 +0200
+++ isa-diag/ne2k-diag.c	2007-02-16 17:41:12.398872283 +0100
@@ -130,7 +130,9 @@ void write_EEPROM(int port_base, int reg
 static int do_probe(long ioaddr);
 static void rtl8019(long ioaddr);
 static void asix_88190(long ioaddr);
+/* ne2k-diag.c:614: warning: 'dm9008' defined but not used
 static void dm9008(long ioaddr);
+*/
 int mdio_read(long ioaddr, int phy_id, int location);
 
 int opt_a = 0, opt_f = 0, debug = 0, show_eeprom = 0, opt_F = 0, new_irq = 0;
@@ -610,11 +612,12 @@ static const signed char dm_rom_base[16]
 	0, 0, 0xC0, 0xC4,  0xC8, 0xCC, 0xD0, 0xD4,
 	0xD8, 0xDC, 0xC0, 0xC8,  0xD0, 0xD8, 0xC0, 0xD0, };
 
+/*
 static void dm9008(long ioaddr)
 {
 	unsigned short sum = 0, ee_vals[EEPROM_SIZE];
 	int i, configBA, config1C;
-	/* The dm9008 EEPROM registers is on page 3. */  
+	/ * The dm9008 EEPROM registers is on page 3. * /
 	outb(E8390_NODMA+E8390_PAGE3, ioaddr + E8390_CMD);
 	for (i = 0; i < EEPROM_SIZE; i++) {
 		ee_vals[i] = read_eeprom(&dm_ee_tbl, ioaddr, i);
@@ -644,6 +647,7 @@ static void dm9008(long ioaddr)
 	printf(" Vendor ID is %4.4x %4.4x, serial # %4.4x %4.4x\n",
 		   ee_vals[17], ee_vals[16], ee_vals[19], ee_vals[18]);
 }
+*/
 
 /* MII - MDIO  (Media Independent Interface - Management Data I/O) accesses. */
 
Index: isa-diag/hp+.c
===================================================================
--- isa-diag/hp+.c.orig	2005-03-22 05:36:48.000000000 +0100
+++ isa-diag/hp+.c	2007-02-16 17:58:29.567101013 +0100
@@ -199,7 +199,7 @@ main(int argc, char *argv[])
 	for(i = 8; i < 16; i++)
 	    printf(" %2.2x", inb(ioaddr + i));
 	outb(0x0d, ioaddr + 10);
-	memory_base = (caddr_t)(inw(ioaddr + 9) << 8);
+	memory_base = (caddr_t)(intptr_t)(inw(ioaddr + 9) << 8);
 	printf("\n  IRQ %d, memory address %#x, Internal Rx pages %2.2x-%2.2x.\n",
 	       inb(ioaddr + 13) & 0x0f, inw(ioaddr + 9) << 8, inb(ioaddr + 14),
 	       inb(ioaddr + 15));
@@ -251,8 +251,8 @@ static int map_shared_mem(caddr_t locati
 	}
 	shared_mem = mmap(location, extent, PROT_READ|PROT_WRITE, MAP_SHARED,
 					  memfd, (off_t)location);
-	printf("Shared memory at %#x mapped to %#x.\n",
-		   (int)location, (int)shared_mem);
+	printf("Shared memory at %p mapped to %p.\n",
+		   location, shared_mem);
 	return 0;
 }
 
@@ -260,7 +260,7 @@ static int test_shared_mem(int ioaddr, c
 {
 	int option_reg = inw(ioaddr + HPP_OPTION);
 
-	block_output_io(ioaddr, "Zero page info ZZZeerooo", 20, 0);
+	block_output_io(ioaddr, (const unsigned char *)"Zero page info ZZZeerooo", 20, 0);
 
 	map_shared_mem(location, 0x8000);
 	
@@ -290,9 +290,9 @@ static int test_io_mem(int ioaddr)
 
 	{
 		unsigned char buff[40];
-		block_output_io(ioaddr, "Rx buffer wrap is faulty!", 20, 0x7ff6);
-		block_output_io(ioaddr, "Zero page write worked.", 24, 0);
-		block_output_io(ioaddr, "wrap is working.", 20, 0x0c00);
+		block_output_io(ioaddr, (const unsigned char *)"Rx buffer wrap is faulty!", 20, 0x7ff6);
+		block_output_io(ioaddr, (const unsigned char *)"Zero page write worked.", 24, 0);
+		block_output_io(ioaddr, (const unsigned char *)"wrap is working.", 20, 0x0c00);
 		block_input_io(ioaddr, buff, 24, 0);
 		printf("Buffer input at 0 is '%20.30s'.\n", buff);
 		block_input_io(ioaddr, buff, 30, 0x7ff6);
openSUSE Build Service is sponsored by