[Asterisk-cvs] zaptel wct1xxp.c,1.18,1.19 zaptel.c,1.76,1.77

markster at lists.digium.com markster at lists.digium.com
Sun Jun 13 11:30:27 CDT 2004


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv29457

Modified Files:
	wct1xxp.c zaptel.c 
Log Message:
Rid zaptel of 64-bit compiler warnings


Index: wct1xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct1xxp.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- wct1xxp.c	26 May 2004 15:45:31 -0000	1.18
+++ wct1xxp.c	13 Jun 2004 16:34:45 -0000	1.19
@@ -1229,7 +1229,7 @@
 	/* Second frame */
 	outl(wc->readdma + ZT_CHUNKSIZE * 32 * 2 - 4, wc->ioaddr + WC_DMARE);	/* End */
 	
-	if (debug) printk("Setting up DMA (write/read = %08x/%08x)\n", wc->writedma, wc->readdma);
+	if (debug) printk("Setting up DMA (write/read = %08lx/%08lx)\n", (long)wc->writedma, (long)wc->readdma);
 
 	/* Check out the controller */
 	if (debug) printk("Controller version: %02x\n", control_get_reg(wc, WC_VERSION));

Index: zaptel.c
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- zaptel.c	18 May 2004 07:02:39 -0000	1.76
+++ zaptel.c	13 Jun 2004 16:34:45 -0000	1.77
@@ -435,18 +435,19 @@
 
 static int zaptel_proc_read(char *page, char **start, off_t off, int count, int *eof, void *data)
 {
-	int x, span, len = 0;
+	int x, len = 0;
+	long span;
 
 	if (off > 0)
 		return 0;
 
-	(int *)span = data;
+	(long *)span = data;
 
 	if (!span)
 		return 0;
 
 	if (spans[span]->name) 
-		len += sprintf(page + len, "Span %d: %s ", span, spans[span]->name);
+		len += sprintf(page + len, "Span %ld: %s ", span, spans[span]->name);
 	if (spans[span]->desc)
 		len += sprintf(page + len, "\"%s\"", spans[span]->desc);
 	else
@@ -2794,27 +2795,27 @@
 		spin_unlock_irqrestore(&chans[j]->lock, flags);
 		printk("Dump of Zaptel Channel %d (%s,%d,%d):\n\n",j,
 			mychan.name,mychan.channo,mychan.chanpos);
-		printk("flags: %x hex, writechunk: %08x, readchunk: %08x\n",
-			mychan.flags, (int) mychan.writechunk, (int) mychan.readchunk);
-		printk("rxgain: %08x, txgain: %08x, gainalloc: %d\n",
-			(int) mychan.rxgain, (int)mychan.txgain, mychan.gainalloc);
-		printk("span: %08x, sig: %x hex, sigcap: %x hex\n",
-			(int)mychan.span, mychan.sig, mychan.sigcap);
+		printk("flags: %x hex, writechunk: %08lx, readchunk: %08lx\n",
+			mychan.flags, (long) mychan.writechunk, (long) mychan.readchunk);
+		printk("rxgain: %08lx, txgain: %08lx, gainalloc: %d\n",
+			(long) mychan.rxgain, (long)mychan.txgain, mychan.gainalloc);
+		printk("span: %08lx, sig: %x hex, sigcap: %x hex\n",
+			(long)mychan.span, mychan.sig, mychan.sigcap);
 		printk("inreadbuf: %d, outreadbuf: %d, inwritebuf: %d, outwritebuf: %d\n",
 			mychan.inreadbuf, mychan.outreadbuf, mychan.inwritebuf, mychan.outwritebuf);
 		printk("blocksize: %d, numbufs: %d, txbufpolicy: %d, txbufpolicy: %d\n",
 			mychan.blocksize, mychan.numbufs, mychan.txbufpolicy, mychan.rxbufpolicy);
 		printk("txdisable: %d, rxdisable: %d, iomask: %d\n",
 			mychan.txdisable, mychan.rxdisable, mychan.iomask);
-		printk("curzone: %08x, tonezone: %d, curtone: %08x, tonep: %d\n",
-			(int) mychan.curzone, mychan.tonezone, (int) mychan.curtone, mychan.tonep);
+		printk("curzone: %08lx, tonezone: %d, curtone: %08lx, tonep: %d\n",
+			(long) mychan.curzone, mychan.tonezone, (long) mychan.curtone, mychan.tonep);
 		printk("digitmode: %d, txdialbuf: %s, dialing: %d, aftdialtimer: %d, cadpos. %d\n",
 			mychan.digitmode, mychan.txdialbuf, mychan.dialing,
 				mychan.afterdialingtimer, mychan.cadencepos);
 		printk("confna: %d, confn: %d, confmode: %d, confmute: %d\n",
 			mychan.confna, mychan._confn, mychan.confmode, mychan.confmute);
-		printk("ec: %08x, echocancel: %d, deflaw: %d, xlaw: %08x\n",
-			(int) mychan.ec, mychan.echocancel, mychan.deflaw, (int) mychan.xlaw);
+		printk("ec: %08lx, echocancel: %d, deflaw: %d, xlaw: %08lx\n",
+			(long) mychan.ec, mychan.echocancel, mychan.deflaw, (long) mychan.xlaw);
 		printk("echostate: %02x, echotimer: %d, echolastupdate: %d\n",
 			(int) mychan.echostate, mychan.echotimer, mychan.echolastupdate);
 		printk("itimer: %d, otimer: %d, ringdebtimer: %d\n\n",
@@ -4122,7 +4123,7 @@
 
 #ifdef CONFIG_PROC_FS
 			sprintf(tempfile, "zaptel/%d", span->spanno);
-			proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444, NULL , zaptel_proc_read, (int *)span->spanno);
+			proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444, NULL , zaptel_proc_read, (int *)(long)span->spanno);
 #endif
 
 #ifdef CONFIG_DEVFS_FS




More information about the svn-commits mailing list