mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add a default case for switch over dc_family_t
This adds a default case which just errors out for the switch over dc_family_t instead of checking a uninitialized variable if this was ever called with something else than one of the expected dc-family types. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a4c35f1d63
commit
c38b7d3922
1 changed files with 3 additions and 0 deletions
|
@ -963,6 +963,9 @@ dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned
|
|||
case DC_FAMILY_HW_OSTC3:
|
||||
rc = hw_ostc_parser_create (&parser, data->context, data->deviceid, 1);
|
||||
break;
|
||||
default:
|
||||
report_error("Device type not handled!");
|
||||
return DC_STATUS_UNSUPPORTED;
|
||||
}
|
||||
if (rc != DC_STATUS_SUCCESS) {
|
||||
report_error("Error creating parser.");
|
||||
|
|
Loading…
Add table
Reference in a new issue