Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use correct type for bladerf_get_frequency #22

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use correct type in call to bladerf_get_frequency
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
commit 62844ce7eff0a9e5f227249b5de69883922b9923
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