remove unused variables, type fixes

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Steve Markgraf 11 years ago
parent 0a90c7d417
commit 50743b1ccb
  1. 2
      src/librtlsdr.c
  2. 7
      src/rtl_adsb.c
  3. 12
      src/rtl_fm.c
  4. 6
      src/rtl_power.c
  5. 2
      src/rtl_sdr.c
  6. 2
      src/tuner_e4k.c
  7. 2
      src/tuner_r82xx.c

@ -534,7 +534,7 @@ int rtlsdr_demod_write_reg(rtlsdr_dev_t *dev, uint8_t page, uint16_t addr, uint1
void rtlsdr_set_gpio_bit(rtlsdr_dev_t *dev, uint8_t gpio, int val)
{
uint8_t r;
uint16_t r;
gpio = 1 << gpio;
r = rtlsdr_read_reg(dev, SYSB, GPO, 1);

@ -306,8 +306,7 @@ void manchester(uint16_t *buf, int len)
void messages(uint16_t *buf, int len)
{
int i, i2, start, preamble_found;
int data_i, index, shift, frame_len;
int i, data_i, index, shift, frame_len;
// todo, allow wrap across buffers
for (i=0; i<len; i++) {
if (buf[i] > 1) {
@ -365,8 +364,8 @@ int main(int argc, char **argv)
struct sigaction sigact;
#endif
char *filename = NULL;
int n_read, r, opt;
int i, gain = AUTO_GAIN; /* tenths of a dB */
int r, opt;
int gain = AUTO_GAIN; /* tenths of a dB */
int dev_index = 0;
int dev_given = 0;
int ppm_error = 0;

@ -394,7 +394,7 @@ void fifth_order(int16_t *data, int length, int16_t *hist)
void generic_fir(int16_t *data, int length, int *fir, int16_t *hist)
/* Okay, not at all generic. Assumes length 9, fix that eventually. */
{
int d, f, temp, sum;
int d, temp, sum;
for (d=0; d<length; d+=2) {
temp = data[d];
sum = 0;
@ -730,8 +730,7 @@ void arbitrary_resample(int16_t *buf1, int16_t *buf2, int len1, int len2)
void full_demod(struct demod_state *d)
{
uint8_t dump[BUFFER_DUMP];
int i, ds, ds_p, freq_next, n_read;
int i, ds_p;
int sr = 0;
ds_p = d->downsample_passes;
if (ds_p) {
@ -856,7 +855,7 @@ static void optimal_settings(int freq, int rate)
{
// giant ball of hacks
// seems unable to do a single pass, 2:1
int r, capture_freq, capture_rate;
int capture_freq, capture_rate;
struct dongle_state *d = &dongle;
struct demod_state *dm = &demod;
struct controller_state *cs = &controller;
@ -883,7 +882,7 @@ static void *controller_thread_fn(void *arg)
{
// thoughts for multiple dongles
// might be no good using a controller thread if retune/rate blocks
int i, r;
int i;
struct controller_state *s = arg;
if (s->wb_mode) {
@ -1042,8 +1041,7 @@ int main(int argc, char **argv)
#ifndef _WIN32
struct sigaction sigact;
#endif
int n_read, r, opt;
int i;
int r, opt;
int dev_given = 0;
int custom_ppm = 0;
dongle_init(&dongle);

@ -403,7 +403,6 @@ void rms_power(struct tuning_state *ts)
uint8_t *buf = ts->buf8;
int buf_len = ts->buf_len;
long p, t;
int ln, lp;
double dc, err;
p = t = 0L;
@ -588,7 +587,7 @@ void remove_dc(int16_t *data, int length)
void generic_fir(int16_t *data, int length, int *fir)
/* Okay, not at all generic. Assumes length 9, fix that eventually. */
{
int d, f, temp, sum;
int d, temp, sum;
int hist[9] = {0,};
/* cheat on the beginning, let it go unfiltered */
for (d=0; d<18; d+=2) {
@ -760,10 +759,9 @@ int main(int argc, char **argv)
struct sigaction sigact;
#endif
char *filename = NULL;
int i, length, n_read, r, opt, wb_mode = 0;
int i, length, r, opt, wb_mode = 0;
int f_set = 0;
int gain = AUTO_GAIN; // tenths of a dB
uint8_t *buffer;
int dev_index = 0;
int dev_given = 0;
int ppm_error = 0;

@ -111,7 +111,7 @@ int main(int argc, char **argv)
char *filename = NULL;
int n_read;
int r, opt;
int i, gain = 0;
int gain = 0;
int ppm_error = 0;
int sync_mode = 0;
FILE *file;

@ -532,8 +532,6 @@ uint32_t e4k_compute_pll_params(struct e4k_pll_params *oscp, uint32_t fosc, uint
int e4k_tune_params(struct e4k_state *e4k, struct e4k_pll_params *p)
{
uint8_t val;
/* program R + 3phase/2phase */
e4k_reg_write(e4k, E4K_REG_SYNTH7, p->r_idx);
/* program Z */

@ -765,7 +765,7 @@ static int r82xx_set_tv_standard(struct r82xx_priv *priv,
{
int rc, i;
uint32_t if_khz, filt_cal_lo;
uint8_t data[5], val;
uint8_t data[5];
uint8_t filt_gain, img_r, filt_q, hp_cor, ext_enable, loop_through;
uint8_t lt_att, flt_ext_widest, polyfil_cur;
int need_calibration;

Loading…
Cancel
Save