[zaptel-commits] kpfleming: branch 1.2 r1920 - in /branches/1.2: ./ xpp/

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Jan 23 08:25:43 MST 2007


Author: kpfleming
Date: Tue Jan 23 09:25:42 2007
New Revision: 1920

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1920
Log:
clean up various compiler warnings

Modified:
    branches/1.2/pciradio.c
    branches/1.2/torisa.c
    branches/1.2/wctdm.c
    branches/1.2/wctdm24xxp.c
    branches/1.2/xpp/xpp_zap.c
    branches/1.2/zaptel.c

Modified: branches/1.2/pciradio.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/pciradio.c?view=diff&rev=1920&r1=1919&r2=1920
==============================================================================
--- branches/1.2/pciradio.c (original)
+++ branches/1.2/pciradio.c Tue Jan 23 09:25:42 2007
@@ -169,8 +169,8 @@
 	volatile unsigned long ioaddr;
 	dma_addr_t 	readdma;
 	dma_addr_t	writedma;
-	volatile int *writechunk;	/* Double-word aligned write memory */
-	volatile int *readchunk;	/* Double-word aligned read memory */
+	volatile unsigned int *writechunk;	/* Double-word aligned write memory */
+	volatile unsigned int *readchunk;	/* Double-word aligned read memory */
 	unsigned char saudio_status[NUM_CHANS];
 	char gotcor[NUM_CHANS];
 	char gotct[NUM_CHANS];
@@ -539,7 +539,7 @@
 static void _do_encdec(struct pciradio *rad)
 {
 int	i,n;
-unsigned char byte1,byte2;
+unsigned char byte1 = 0, byte2 = 0;
 
 	/* return doing nothing if busy */
 	if ((rad->encdec.lastcmd + 2) > jiffies) return;
@@ -1260,7 +1260,7 @@
 				if ((rad->rxindex < stack.p.data) &&
 				  (rad->srxtimer < SRX_TIMEOUT) &&
 				    ((rad->remmode[chan->chanpos - 1] == ZT_RADPAR_REM_SERIAL) ||
-					(!strchr(rad->rxbuf,'\r'))))
+					(!strchr((char *) rad->rxbuf,'\r'))))
 				{
 					spin_unlock_irqrestore(&rad->lock,flags);
 					interruptible_sleep_on_timeout(&mywait,2);
@@ -1662,7 +1662,7 @@
 
 			/* Allocate enough memory for two zt chunks, receive and transmit.  Each sample uses
 			   32 bits.  Allocate an extra set just for control too */
-			rad->writechunk = (int *)pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
+			rad->writechunk = pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
 			if (!rad->writechunk) {
 				printk("pciradio: Unable to allocate DMA-able memory\n");
 				if (rad->freeregion)

Modified: branches/1.2/torisa.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/torisa.c?view=diff&rev=1920&r1=1919&r2=1920
==============================================================================
--- branches/1.2/torisa.c (original)
+++ branches/1.2/torisa.c Tue Jan 23 09:25:42 2007
@@ -1139,6 +1139,7 @@
 }
 
 
+#if !defined(LINUX26)
 static int __init set_tor_base(char *str)
 {
 	base = simple_strtol(str, NULL, 0);
@@ -1146,6 +1147,7 @@
 }
 
 __setup("tor=", set_tor_base);
+#endif
 
 static void __exit tor_exit(void)
 {

Modified: branches/1.2/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm.c?view=diff&rev=1920&r1=1919&r2=1920
==============================================================================
--- branches/1.2/wctdm.c (original)
+++ branches/1.2/wctdm.c Tue Jan 23 09:25:42 2007
@@ -345,8 +345,8 @@
 	unsigned long ioaddr;
 	dma_addr_t 	readdma;
 	dma_addr_t	writedma;
-	volatile int *writechunk;					/* Double-word aligned write memory */
-	volatile int *readchunk;					/* Double-word aligned read memory */
+	volatile unsigned int *writechunk;				/* Double-word aligned write memory */
+	volatile unsigned int *readchunk;				/* Double-word aligned read memory */
 	struct zt_chan chans[NUM_CARDS];
 };
 
@@ -2204,7 +2204,7 @@
 
 			/* Allocate enough memory for two zt chunks, receive and transmit.  Each sample uses
 			   32 bits.  Allocate an extra set just for control too */
-			wc->writechunk = (int *)pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
+			wc->writechunk = pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
 			if (!wc->writechunk) {
 				printk("wctdm: Unable to allocate DMA-able memory\n");
 				if (wc->freeregion)

Modified: branches/1.2/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm24xxp.c?view=diff&rev=1920&r1=1919&r2=1920
==============================================================================
--- branches/1.2/wctdm24xxp.c (original)
+++ branches/1.2/wctdm24xxp.c Tue Jan 23 09:25:42 2007
@@ -398,7 +398,6 @@
 static int battthresh = DEFAULT_BATT_THRESH;
 static int debug = 0;
 static int robust = 0;
-static int timingonly = 0;
 static int lowpower = 0;
 static int boostringer = 0;
 static int fastringer = 0;
@@ -410,7 +409,6 @@
 #ifdef VPM_SUPPORT
 static int vpmsupport = 1;
 static int vpmdtmfsupport = 0;
-static int vpmspans = 4;
 #define VPM_DEFAULT_DTMFTHRESHOLD 1250
 static int dtmfthreshold = VPM_DEFAULT_DTMFTHRESHOLD;
 #endif
@@ -2705,7 +2703,7 @@
 
 			/* Allocate enough memory for two zt chunks, receive and transmit.  Each sample uses
 			   32 bits.  Allocate an extra set just for control too */
-			wc->writechunk = (int *)pci_alloc_consistent(pdev, PCI_WINDOW_SIZE, &wc->writedma);
+			wc->writechunk = pci_alloc_consistent(pdev, PCI_WINDOW_SIZE, &wc->writedma);
 			if (!wc->writechunk) {
 				printk("wctdm: Unable to allocate DMA-able memory\n");
 				if (wc->freeregion)
@@ -2878,7 +2876,6 @@
 module_param(robust, int, 0600);
 module_param(_opermode, int, 0600);
 module_param(opermode, charp, 0600);
-module_param(timingonly, int, 0600);
 module_param(lowpower, int, 0600);
 module_param(boostringer, int, 0600);
 module_param(fastringer, int, 0600);
@@ -2889,7 +2886,6 @@
 #ifdef VPM_SUPPORT
 module_param(vpmsupport, int, 0600);
 module_param(vpmdtmfsupport, int, 0600);
-module_param(vpmspans, int, 0600);
 module_param(dtmfthreshold, int, 0600);
 #endif
 #else
@@ -2898,7 +2894,6 @@
 MODULE_PARM(robust, "i");
 MODULE_PARM(_opermode, "i");
 MODULE_PARM(opermode, "s");
-MODULE_PARM(timingonly, "i");
 MODULE_PARM(lowpower, "i");
 MODULE_PARM(boostringer, "i");
 MODULE_PARM(fastringer, "i");
@@ -2909,7 +2904,6 @@
 #ifdef VPM_SUPPORT
 MODULE_PARM(vpmsupport, "i");
 MODULE_PARM(vpmdtmfsupport, "i");
-MODULE_PARM(vpmspans, "i");
 MODULE_PARM(dtmfthreshold, "i");
 #endif
 #endif

Modified: branches/1.2/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_zap.c?view=diff&rev=1920&r1=1919&r2=1920
==============================================================================
--- branches/1.2/xpp/xpp_zap.c (original)
+++ branches/1.2/xpp/xpp_zap.c Tue Jan 23 09:25:42 2007
@@ -433,7 +433,9 @@
 		len += sprintf(page + len, "\nzaptel state: %s RUNNING\n", (xpd->span.flags & ZT_FLAG_RUNNING)?"IS":"IS NOT");
 		len += sprintf(page + len, "\nPCM:\n            |         [readchunk]       |         [writechunk]      | delay");
 		for_each_line(xpd, i) {
+#if 0
 			struct zt_chan	*chans = xpd->span.chans;
+#endif
 			byte	rchunk[ZT_CHUNKSIZE];
 			byte	wchunk[ZT_CHUNKSIZE];
 			byte	*rp;

Modified: branches/1.2/zaptel.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/zaptel.c?view=diff&rev=1920&r1=1919&r2=1920
==============================================================================
--- branches/1.2/zaptel.c (original)
+++ branches/1.2/zaptel.c Tue Jan 23 09:25:42 2007
@@ -184,6 +184,7 @@
 
 static int deftaps = 64;
 
+#if !defined(LINUX26)
 static 
 __u16 fcstab[256] =
 {
@@ -220,6 +221,7 @@
 	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
 	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
 };
+#endif
 
 static int debug;
 
@@ -6202,7 +6204,7 @@
 static void __zt_receive_chunk(struct zt_chan *chan, unsigned char *buf)
 {
 	/* Receive chunk of audio -- called with chan->lock held */
-	char waste[ZT_CHUNKSIZE];
+	unsigned char waste[ZT_CHUNKSIZE];
 
 	if (!buf) {
 		memset(waste, ZT_LIN2X(0, chan), sizeof(waste));



More information about the zaptel-commits mailing list