fix: Failed to compile on mac

This commit is contained in:
dreamsourcelabTAI 2023-05-16 16:57:02 +08:00
parent 4836145ae4
commit e0c86995be
2 changed files with 6 additions and 4 deletions

View File

@ -220,7 +220,7 @@ static int get_pattern_mode_from_file(uint8_t device_mode)
dir = g_dir_open(dir_str,0,NULL);
if(dir == NULL)
{
return;
return 0;
}
while ((filename = g_dir_read_name(dir)) != NULL)
@ -251,6 +251,8 @@ static int get_pattern_mode_from_file(uint8_t device_mode)
pattern_dso_count = index;
else if(device_mode == ANALOG)
pattern_analog_count = index;
return 0;
}
static int scan_dsl_file(struct sr_dev_inst *sdi)
@ -423,7 +425,7 @@ static int init_random_data(struct session_vdev * vdev,struct sr_dev_inst *sdi)
probe_count[cur_probe] -= 1;
}
}
return;
return 0;
}
@ -448,7 +450,7 @@ static GSList *hw_scan(GSList *options)
if (vdev == NULL)
{
sr_err("%s: sdi->priv malloc failed", __func__);
return SR_ERR_MALLOC;
return devices;
}
sdi = sr_dev_inst_new(LOGIC, SR_ST_INACTIVE,

View File

@ -136,7 +136,7 @@ struct DEMO_caps {
const uint64_t *vdivs;
uint8_t vga_id;
uint16_t default_channelmode;
enum DEMO_PATTERN default_pattern;
int default_pattern; /**enum DEMO_PATTERN type*/
uint64_t default_timebase;
};