@@ -608,7 +608,6 @@ int plugin_data_capture_bytes_per_sample(const char *device)
608
608
{
609
609
struct iio_device * dev ;
610
610
struct extra_dev_info * dev_info ;
611
- int nb_channels ;
612
611
613
612
if (!device )
614
613
return 0 ;
@@ -617,7 +616,7 @@ int plugin_data_capture_bytes_per_sample(const char *device)
617
616
618
617
if (!dev )
619
618
return 0 ;
620
- nb_channels = iio_device_get_channels_count ( dev );
619
+
621
620
dev_info = iio_device_get_data (dev );
622
621
623
622
return iio_device_get_sample_size (dev , dev_info -> channels_mask );
@@ -1247,7 +1246,6 @@ static off_t get_trigger_offset(const struct iio_channel *chn,
1247
1246
size_t i ;
1248
1247
const struct iio_device * dev = iio_channel_get_device (chn );
1249
1248
struct extra_dev_info * dev_info = iio_device_get_data (dev );
1250
- int nb_channels = iio_device_get_channels_count (dev );
1251
1249
1252
1250
if (iio_channel_is_enabled (chn , dev_info -> channels_mask )) {
1253
1251
for (i = info -> offset / 2 ; i >= 1 ; i -- ) {
@@ -1536,7 +1534,6 @@ static int capture_setup(void)
1536
1534
iio_channel_disable (ch , dev_info -> channels_mask );
1537
1535
}
1538
1536
1539
-
1540
1537
sample_size = iio_device_get_sample_size (dev , dev_info -> channels_mask );
1541
1538
if (sample_size == 0 || sample_count == 0 )
1542
1539
continue ;
@@ -2170,18 +2167,15 @@ void do_init(struct iio_context *new_ctx)
2170
2167
init_device_list (new_ctx );
2171
2168
load_plugins (notebook , NULL );
2172
2169
osc_preferences = aggregate_osc_preferences_from_plugins (plugin_list );
2173
-
2174
2170
int width = -1 , height = -1 ;
2175
2171
plugins_get_preferred_size (plugin_list , & width , & height );
2176
2172
window_size_readjust (GTK_WINDOW (main_window ), width , height );
2177
-
2178
2173
if (!strcmp (iio_context_get_name (new_ctx ), "network" ) &&
2179
2174
iio_context_get_devices_count (new_ctx )) {
2180
2175
gtk_widget_set_visible (infobar , false);
2181
2176
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE , 1000 ,
2182
2177
idle_timeout_check , new_ctx , NULL );
2183
2178
}
2184
-
2185
2179
spect_analyzer_plugin = get_plugin_from_name ("Spectrum Analyzer" );
2186
2180
}
2187
2181
@@ -2759,9 +2753,8 @@ int osc_identify_attrib(struct iio_context *_ctx, const char *attrib,
2759
2753
int i ;
2760
2754
bool is_debug ;
2761
2755
int ret = - EINVAL ;
2762
- const char * file ;
2756
+ gchar * dev_name , * * elems = g_strsplit ( attrib , "." , 3 ) ;
2763
2757
2764
- gchar * dev_name , * filename , * * elems = g_strsplit (attrib , "." , 3 );
2765
2758
if (!elems )
2766
2759
return - EINVAL ;
2767
2760
@@ -2771,13 +2764,10 @@ int osc_identify_attrib(struct iio_context *_ctx, const char *attrib,
2771
2764
if (!elems [i ])
2772
2765
goto cleanup ;
2773
2766
2774
- if (is_debug ) {
2767
+ if (is_debug )
2775
2768
dev_name = elems [1 ];
2776
- filename = elems [2 ];
2777
- } else {
2769
+ else
2778
2770
dev_name = elems [0 ];
2779
- filename = elems [1 ];
2780
- }
2781
2771
2782
2772
device = iio_context_find_device (_ctx , dev_name );
2783
2773
if (!device ) {
0 commit comments