Skip to content

Commit

Permalink
use correct type in call to bladerf_get_frequency
Browse files Browse the repository at this point in the history
Building against ubuntu bionic (amd64) and current bladeRF sources (4bcdd6ec)
resulted in the following error:

```
    sdr_bladerf.c: In function 'show_config':
    sdr_bladerf.c:116:76: error: passing argument 3 of 'bladerf_get_frequency' from incompatible pointer type [-Werror=incompatible-pointer-types]
             (status = bladerf_get_frequency(BladeRF.device, BLADERF_MODULE_RX, &freq)) < 0 ||
                                                                                ^
    In file included from sdr_bladerf.c:23:0:
    /usr/include/libbladeRF.h:1117:15: note: expected 'bladerf_frequency * {aka long unsigned int *}' but argument is of type 'unsigned int *'
     int CALL_CONV bladerf_get_frequency(struct bladerf *dev,
^~~~~~~~~~~~~~~~~~~~~
```

This commit uses the correct type (`bladerf_frequency`) for the `freq`
variable.
  • Loading branch information
larsks committed Aug 28, 2018
1 parent 20a16d5 commit 62844ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdr_bladerf.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void show_config()
int status;

unsigned rate;
unsigned freq;
bladerf_frequency freq;
bladerf_lpf_mode lpf_mode;
unsigned lpf_bw;
bladerf_lna_gain lna_gain;
Expand Down

0 comments on commit 62844ce

Please sign in to comment.