Skip to content

Commit

Permalink
Fix Compiler Error on RTL Dev Enum;
Browse files Browse the repository at this point in the history
  • Loading branch information
lwvmobile committed Sep 13, 2023
1 parent b1013c1 commit 8d522e2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dsd_main.c
Expand Up @@ -2441,6 +2441,10 @@ main (int argc, char **argv)
if((strncmp(opts.audio_in_dev, "rtl", 3) == 0)) //rtl dongle input
{
uint8_t rtl_ok = 0;
//use to list out all detected RTL dongles
char vendor[256], product[256], serial[256], userdev[256];
int device_count = 0;

#ifdef USE_RTLSDR
fprintf (stderr, "RTL Input: ");
char * curr;
Expand Down Expand Up @@ -2490,17 +2494,14 @@ main (int argc, char **argv)

RTLEND:

//use to list out all detected RTL dongles
char vendor[256], product[256], serial[256], userdev[256];
int i, device_count = 0;
device_count = rtlsdr_get_device_count();
if (!device_count)
{
fprintf(stderr, "No supported devices found.\n");
exitflag = 1;
}
else fprintf(stderr, "Found %d device(s):\n", device_count);
for (i = 0; i < device_count; i++)
for (int i = 0; i < device_count; i++)
{
rtlsdr_get_device_usb_strings(i, vendor, product, serial);
fprintf(stderr, " %d: %s, %s, SN: %s\n", i, vendor, product, serial);
Expand Down

0 comments on commit 8d522e2

Please sign in to comment.