Skip to content

Commit

Permalink
examples/adrv9009-iiostream: Fix comment and variables
Browse files Browse the repository at this point in the history
- Remove unused variables. A warning was only generated in the macOS and
  ARM Linux builds and not in x86 Linux.
- The uninitialized variable should never be read since the example will
  exit() if an error occurs. A warning was only generated with the macOS
  builds, not the x86 or ARM Linux builds.

Signed-off-by: Philip Molloy <[email protected]>
  • Loading branch information
pamolloy authored and dNechita committed Feb 11, 2025
1 parent ec9373e commit 2cf643d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/adrv9009-iiostream.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ static void wr_ch_lli(struct iio_channel *chn, const char* what, long long val)
errchk(attr ? iio_attr_write_longlong(attr, val) : -ENOENT, what);
}

/* write attribute: long long int */
/* read attribute: long long int */
static long long rd_ch_lli(struct iio_channel *chn, const char* what)
{
const struct iio_attr *attr = iio_channel_find_attr(chn, what);
long long val;
long long val = 0;

errchk(attr ? iio_attr_read_longlong(attr, &val) : -ENOENT, what);

Expand Down Expand Up @@ -191,10 +191,6 @@ int main (__notused int argc, __notused char **argv)
struct iio_channel *tx0_i = NULL;
struct iio_channel *tx0_q = NULL;

// RX and TX sample counters
size_t nrx = 0;
size_t ntx = 0;

// RX and TX sample size
size_t rx_sample_sz, tx_sample_sz;

Expand Down

0 comments on commit 2cf643d

Please sign in to comment.