[svn-commits] twilson: branch 1.8 r358029 - in /branches/1.8/channels: ./ xpmr/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 2 17:27:10 CST 2012


Author: twilson
Date: Fri Mar  2 17:27:06 2012
New Revision: 358029

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358029
Log:
Fix unused-but-set-variable warnings

All of these were pretty obviously unused. Some were unused because
the code that used them was #if 0'd. In those cases, I just commented
out the unused-but-set variables.

Modified:
    branches/1.8/channels/chan_usbradio.c
    branches/1.8/channels/xpmr/xpmr.c

Modified: branches/1.8/channels/chan_usbradio.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_usbradio.c?view=diff&rev=358029&r1=358028&r2=358029
==============================================================================
--- branches/1.8/channels/chan_usbradio.c (original)
+++ branches/1.8/channels/chan_usbradio.c Fri Mar  2 17:27:06 2012
@@ -1118,7 +1118,7 @@
 static void *hidthread(void *arg)
 {
 	unsigned char buf[4],bufsave[4],keyed;
-	char lastrx, txtmp;
+	char txtmp;
 	int res;
 	struct usb_device *usb_dev;
 	struct usb_dev_handle *usb_handle;
@@ -1157,7 +1157,6 @@
 		pthread_exit(NULL);
 	}
 	traceusb1(("hidthread: Starting normally on %s!!\n",o->name));
-	lastrx = 0;
 	// popen 
 	while (!o->stophid) {
 		pfd.fd = o->pttkick[0];
@@ -2872,11 +2871,9 @@
 	float settingmax;
 	
 	int setting=0, tries=0, tmpdiscfactor, meas;
-	int tunetype=0;
 
 	settingmax = o->micmax;
 
-	if(o->pmrChan->rxDemod)tunetype=1;
 	o->pmrChan->b.tuning=1;
 
 	setting = settingstart;

Modified: branches/1.8/channels/xpmr/xpmr.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/xpmr/xpmr.c?view=diff&rev=358029&r1=358028&r2=358029
==============================================================================
--- branches/1.8/channels/xpmr/xpmr.c (original)
+++ branches/1.8/channels/xpmr/xpmr.c Fri Mar  2 17:27:06 2012
@@ -480,7 +480,7 @@
 	#define DCgainBpfNoise 	65536
 
 	i16 samples,iOutput, *input, *output, *noutput;
-	i16 *x, *coef, *coef2;
+	i16 *x, *coef;
     i32 i, naccum, outputGain, calcAdjust;
 	i64 y;
 	i16 nx, hyst, setpt, compOut;
@@ -500,7 +500,6 @@
 
 	nx        = mySps->nx;
 	coef      = mySps->coef;
-	coef2     = mySps->coef2;
 
 	calcAdjust = mySps->calcAdjust;
 	outputGain = mySps->outputGain;
@@ -779,7 +778,7 @@
 	i16 npoints;
  	i16 *input, *output;
 
-	i32 inputGain, outputGain,calcAdjust;
+	i32 outputGain;
 	i32	i;
 	i32 accum;
 
@@ -794,9 +793,7 @@
 
 	npoints=mySps->nSamples;
 
-	inputGain=mySps->inputGain;
 	outputGain=mySps->outputGain;
-	calcAdjust=mySps->calcAdjust;
 
 	coeff00=((i16*)mySps->coef)[0];
 	coeff01=((i16*)mySps->coef)[1];
@@ -824,13 +821,12 @@
 {
  	i16 *input, *output;
 	i16 npoints;
-	i32 inputGain, outputGain, calcAdjust;
+	i32 outputGain, calcAdjust;
 	i32	i;
 	i32 temp0,temp1;
  	i16 x0;
 	i32 _y0;
 	i16 a0,a1;
-	i16 b0;
 	i16 *coef;
 	i16 *x;
 
@@ -839,7 +835,6 @@
 
 	npoints=mySps->nSamples;
 
-	inputGain=mySps->inputGain;
 	outputGain=mySps->outputGain;
 	calcAdjust=mySps->calcAdjust;
 
@@ -847,7 +842,6 @@
 	x=(i16*)(mySps->x);
 	a0=coef[0];
 	a1=coef[1];
-	b0=coef[2];
 
 	x0=x[0];
 
@@ -875,10 +869,10 @@
 */
 i16 CenterSlicer(t_pmr_sps *mySps)
 {
-	i16 npoints,lhit,uhit;
+	i16 npoints/*, lhit, uhit*/;
  	i16 *input, *output, *buff;
 
-	i32 inputGain, outputGain, inputGainB;
+	i32 inputGainB;
 	i32	i;
 	i32 accum;
 
@@ -901,8 +895,6 @@
 
 	npoints=mySps->nSamples;
 
-	inputGain=mySps->inputGain;
-	outputGain=mySps->outputGain;
 	inputGainB=mySps->inputGainB;
 
 	amax=mySps->amax;
@@ -922,26 +914,26 @@
 		#endif
 		accum=input[i];
 
-		lhit=uhit=0;
+		/* lhit=uhit=0; */
 
 		if(accum>amax)
 		{
 			amax=accum;
-			uhit=1;
+			/* uhit=1; */
 			if(amin<(amax-setpt))
 			{
 				amin=(amax-setpt);
-				lhit=1;
+				/* lhit=1; */
 			}
 		}
 		else if(accum<amin)
 		{
 			amin=accum;
-			lhit=1;
+			/* lhit=1; */
 			if(amax>(amin+setpt))
 			{
 				amax=(amin+setpt);
-				uhit=1;
+				/* uhit=1; */
 			}
 		}
 		#if 0
@@ -1010,7 +1002,6 @@
 	i16 npoints;
  	i16 *input, *output;
 
-	i32 inputGain, outputGain;
 	i32	i;
 	i32 accum;
 
@@ -1039,9 +1030,6 @@
 	output	= mySps->sink;
 
 	npoints=mySps->nSamples;
-
-	inputGain=mySps->inputGain;
-	outputGain=mySps->outputGain;
 
 	amax=mySps->amax;
 	amin=mySps->amin;
@@ -1102,7 +1090,7 @@
 	//i16 samples, lhit,uhit;
  	i16 *input, *output;
 
-	i32 inputGain, outputGain;
+	i32 /*inputGain, */outputGain;
 	i32	i;
 	i32 accum;
 	i32  tmp;
@@ -1111,12 +1099,11 @@
 	i32  amin;			// buffer amplitude minimum
 	//i32  apeak;		// buffer amplitude peak
 	i32  setpt;			// amplitude set point for amplitude comparator
-	i16  compOut;		// amplitude comparator output
 
 	input   = mySps->source;
 	output	= mySps->sink;
 
-	inputGain=mySps->inputGain;
+	/* inputGain=mySps->inputGain; */
 	outputGain=mySps->outputGain;
 
 	npoints=mySps->nSamples;
@@ -1137,7 +1124,6 @@
 		    tmp=((accum-setpt)*4)/128;
 		    accum=setpt+tmp;
 			if(accum>amax)accum=amax;
-			compOut=1;
 			accum=setpt;
 		}
 		else if(accum<-setpt)
@@ -1145,7 +1131,6 @@
 		    tmp=((accum+setpt)*4)/128;
 		    accum=(-setpt)-tmp;
 			if(accum<amin)accum=amin;
-			compOut=1;
 			accum=-setpt;
 		}
 
@@ -1392,8 +1377,8 @@
 i16 ctcss_detect(t_pmr_chan *pChan)
 {
 	i16 i,points2do,*pInput,hit,thit,relax;
-	i16 tnum, tmp,indexNow,gain,diffpeak;
-	i16 difftrig;
+	i16 tnum, tmp,indexNow,diffpeak;
+	/* i16 difftrig; */
 	i16 tv0,tv1,tv2,tv3,indexDebug;
 	i16 points=0;
 	i16 indexWas=0;
@@ -1408,10 +1393,11 @@
 
 	relax  = pChan->rxCtcss->relax;
 	pInput = pChan->rxCtcss->input;
-	gain   = pChan->rxCtcss->gain;
-
+
+	/*
 	if(relax) difftrig=(-0.1*M_Q15);
 	else difftrig=(-0.05*M_Q15);
+	*/
 
 	thit=hit=-1;
 




More information about the svn-commits mailing list