Fix sign comparison warnings
This commit is contained in:
@ -26,7 +26,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
int result = HACKRF_SUCCESS;
|
int result = HACKRF_SUCCESS;
|
||||||
uint8_t board_id = BOARD_ID_INVALID;
|
uint8_t board_id = BOARD_ID_INVALID;
|
||||||
|
@ -325,7 +325,7 @@ uint32_t sample_rate_hz;
|
|||||||
|
|
||||||
bool limit_num_samples = false;
|
bool limit_num_samples = false;
|
||||||
uint64_t samples_to_xfer = 0;
|
uint64_t samples_to_xfer = 0;
|
||||||
size_t bytes_to_xfer = 0;
|
ssize_t bytes_to_xfer = 0;
|
||||||
|
|
||||||
bool baseband_filter_bw = false;
|
bool baseband_filter_bw = false;
|
||||||
uint32_t baseband_filter_bw_hz = 0;
|
uint32_t baseband_filter_bw_hz = 0;
|
||||||
@ -333,12 +333,12 @@ uint32_t baseband_filter_bw_hz = 0;
|
|||||||
bool repeat = false;
|
bool repeat = false;
|
||||||
|
|
||||||
int rx_callback(hackrf_transfer* transfer) {
|
int rx_callback(hackrf_transfer* transfer) {
|
||||||
size_t bytes_to_write;
|
ssize_t bytes_to_write;
|
||||||
|
ssize_t bytes_written;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if( fd != NULL )
|
if( fd != NULL )
|
||||||
{
|
{
|
||||||
ssize_t bytes_written;
|
|
||||||
byte_count += transfer->valid_length;
|
byte_count += transfer->valid_length;
|
||||||
bytes_to_write = transfer->valid_length;
|
bytes_to_write = transfer->valid_length;
|
||||||
if (limit_num_samples) {
|
if (limit_num_samples) {
|
||||||
@ -366,12 +366,12 @@ int rx_callback(hackrf_transfer* transfer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int tx_callback(hackrf_transfer* transfer) {
|
int tx_callback(hackrf_transfer* transfer) {
|
||||||
size_t bytes_to_read;
|
ssize_t bytes_to_read;
|
||||||
|
ssize_t bytes_read;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if( fd != NULL )
|
if( fd != NULL )
|
||||||
{
|
{
|
||||||
ssize_t bytes_read;
|
|
||||||
byte_count += transfer->valid_length;
|
byte_count += transfer->valid_length;
|
||||||
bytes_to_read = transfer->valid_length;
|
bytes_to_read = transfer->valid_length;
|
||||||
if (limit_num_samples) {
|
if (limit_num_samples) {
|
||||||
@ -695,7 +695,7 @@ int main(int argc, char** argv) {
|
|||||||
u64toa(freq_hz,&ascii_u64_data1));
|
u64toa(freq_hz,&ascii_u64_data1));
|
||||||
|
|
||||||
} else if (automatic_tuning) {
|
} else if (automatic_tuning) {
|
||||||
if( (freq_hz > FREQ_MAX_HZ) || (freq_hz < FREQ_MIN_HZ) )
|
if(freq_hz > FREQ_MAX_HZ)
|
||||||
{
|
{
|
||||||
printf("argument error: freq_hz shall be between %s and %s.\n",
|
printf("argument error: freq_hz shall be between %s and %s.\n",
|
||||||
u64toa(FREQ_MIN_HZ,&ascii_u64_data1),
|
u64toa(FREQ_MIN_HZ,&ascii_u64_data1),
|
||||||
|
Reference in New Issue
Block a user