mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-18 18:46:16 +00:00
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. ........ Merged revisions 358029 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358033 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1118,7 +1118,7 @@ static void kickptt(struct chan_usbradio_pvt *o)
|
||||
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 @@ static void *hidthread(void *arg)
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
traceusb1(("hidthread: Starting normally on %s!!\n",o->name));
|
||||
lastrx = 0;
|
||||
// popen
|
||||
while (!o->stophid) {
|
||||
pfd.fd = o->pttkick[0];
|
||||
@@ -2871,11 +2870,9 @@ static void tune_rxinput(int fd, struct chan_usbradio_pvt *o)
|
||||
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;
|
||||
|
@@ -480,7 +480,7 @@ i16 pmr_rx_frontend(t_pmr_sps *mySps)
|
||||
#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 @@ i16 pmr_rx_frontend(t_pmr_sps *mySps)
|
||||
|
||||
nx = mySps->nx;
|
||||
coef = mySps->coef;
|
||||
coef2 = mySps->coef2;
|
||||
|
||||
calcAdjust = mySps->calcAdjust;
|
||||
outputGain = mySps->outputGain;
|
||||
@@ -779,7 +778,7 @@ i16 gp_inte_00(t_pmr_sps *mySps)
|
||||
i16 npoints;
|
||||
i16 *input, *output;
|
||||
|
||||
i32 inputGain, outputGain,calcAdjust;
|
||||
i32 outputGain;
|
||||
i32 i;
|
||||
i32 accum;
|
||||
|
||||
@@ -794,9 +793,7 @@ i16 gp_inte_00(t_pmr_sps *mySps)
|
||||
|
||||
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 gp_diff(t_pmr_sps *mySps)
|
||||
{
|
||||
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 @@ i16 gp_diff(t_pmr_sps *mySps)
|
||||
|
||||
npoints=mySps->nSamples;
|
||||
|
||||
inputGain=mySps->inputGain;
|
||||
outputGain=mySps->outputGain;
|
||||
calcAdjust=mySps->calcAdjust;
|
||||
|
||||
@@ -847,7 +842,6 @@ i16 gp_diff(t_pmr_sps *mySps)
|
||||
x=(i16*)(mySps->x);
|
||||
a0=coef[0];
|
||||
a1=coef[1];
|
||||
b0=coef[2];
|
||||
|
||||
x0=x[0];
|
||||
|
||||
@@ -875,10 +869,10 @@ i16 gp_diff(t_pmr_sps *mySps)
|
||||
*/
|
||||
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 @@ i16 CenterSlicer(t_pmr_sps *mySps)
|
||||
|
||||
npoints=mySps->nSamples;
|
||||
|
||||
inputGain=mySps->inputGain;
|
||||
outputGain=mySps->outputGain;
|
||||
inputGainB=mySps->inputGainB;
|
||||
|
||||
amax=mySps->amax;
|
||||
@@ -922,26 +914,26 @@ i16 CenterSlicer(t_pmr_sps *mySps)
|
||||
#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 MeasureBlock(t_pmr_sps *mySps)
|
||||
i16 npoints;
|
||||
i16 *input, *output;
|
||||
|
||||
i32 inputGain, outputGain;
|
||||
i32 i;
|
||||
i32 accum;
|
||||
|
||||
@@ -1040,9 +1031,6 @@ i16 MeasureBlock(t_pmr_sps *mySps)
|
||||
|
||||
npoints=mySps->nSamples;
|
||||
|
||||
inputGain=mySps->inputGain;
|
||||
outputGain=mySps->outputGain;
|
||||
|
||||
amax=mySps->amax;
|
||||
amin=mySps->amin;
|
||||
setpt=mySps->setpt;
|
||||
@@ -1102,7 +1090,7 @@ i16 SoftLimiter(t_pmr_sps *mySps)
|
||||
//i16 samples, lhit,uhit;
|
||||
i16 *input, *output;
|
||||
|
||||
i32 inputGain, outputGain;
|
||||
i32 /*inputGain, */outputGain;
|
||||
i32 i;
|
||||
i32 accum;
|
||||
i32 tmp;
|
||||
@@ -1111,12 +1099,11 @@ i16 SoftLimiter(t_pmr_sps *mySps)
|
||||
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 @@ i16 SoftLimiter(t_pmr_sps *mySps)
|
||||
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 @@ i16 SoftLimiter(t_pmr_sps *mySps)
|
||||
tmp=((accum+setpt)*4)/128;
|
||||
accum=(-setpt)-tmp;
|
||||
if(accum<amin)accum=amin;
|
||||
compOut=1;
|
||||
accum=-setpt;
|
||||
}
|
||||
|
||||
@@ -1392,8 +1377,8 @@ i16 DelayLine(t_pmr_sps *mySps)
|
||||
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 @@ i16 ctcss_detect(t_pmr_chan *pChan)
|
||||
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user