mirror of https://github.com/drowe67/librtlsdr.git
Non-volatile access to volatile object is UB.
parent
037d192d76
commit
cb5b953d25
|
@ -192,7 +192,7 @@ struct rtlsdr_dev {
|
||||||
rtlsdr_read_async_cb_t cb;
|
rtlsdr_read_async_cb_t cb;
|
||||||
void *cb_ctx;
|
void *cb_ctx;
|
||||||
volatile enum rtlsdr_async_status async_status;
|
volatile enum rtlsdr_async_status async_status;
|
||||||
volatile int async_cancel;
|
int async_cancel;
|
||||||
int use_zerocopy;
|
int use_zerocopy;
|
||||||
/* rtl demod context */
|
/* rtl demod context */
|
||||||
uint32_t rate; /* Hz */
|
uint32_t rate; /* Hz */
|
||||||
|
@ -3539,7 +3539,7 @@ int rtlsdr_read_async(rtlsdr_dev_t *dev, rtlsdr_read_async_cb_t cb, void *ctx,
|
||||||
|
|
||||||
while (RTLSDR_INACTIVE != dev->async_status) {
|
while (RTLSDR_INACTIVE != dev->async_status) {
|
||||||
r = libusb_handle_events_timeout_completed(dev->ctx, &tv,
|
r = libusb_handle_events_timeout_completed(dev->ctx, &tv,
|
||||||
(int *)&dev->async_cancel);
|
&dev->async_cancel);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
/*fprintf(stderr, "handle_events returned: %d\n", r);*/
|
/*fprintf(stderr, "handle_events returned: %d\n", r);*/
|
||||||
if (r == LIBUSB_ERROR_INTERRUPTED) /* stray signal */
|
if (r == LIBUSB_ERROR_INTERRUPTED) /* stray signal */
|
||||||
|
|
Loading…
Reference in New Issue