libfprint/SOURCES/0006-upeksonly-Add-default-clauses-to-switch-statements.patch
2021-09-09 20:12:48 +00:00

59 lines
1.9 KiB
Diff

From 2f0824ab8843ddb8bb46f000f802e641a9252d6d Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Mon, 25 Nov 2019 18:38:32 +0100
Subject: [PATCH 006/181] upeksonly: Add default clauses to switch statements
This effectively only annotates the code to make it clear that variables
set in the switch are always initialized.
---
libfprint/drivers/upeksonly.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/libfprint/drivers/upeksonly.c b/libfprint/drivers/upeksonly.c
index 76ba4e2..ec81375 100644
--- a/libfprint/drivers/upeksonly.c
+++ b/libfprint/drivers/upeksonly.c
@@ -1249,6 +1249,9 @@ loopsm_run_state (FpiSsm *ssm, FpDevice *_dev)
awfsm_1000_run_state,
AWFSM_1000_NUM_STATES);
break;
+
+ default:
+ g_assert_not_reached ();
}
fpi_ssm_start_subsm (ssm, awfsm);
}
@@ -1290,6 +1293,9 @@ loopsm_run_state (FpiSsm *ssm, FpDevice *_dev)
capsm_1001_run_state,
CAPSM_1001_NUM_STATES);
break;
+
+ default:
+ g_assert_not_reached ();
}
fpi_ssm_start_subsm (ssm, capsm);
break;
@@ -1318,6 +1324,9 @@ loopsm_run_state (FpiSsm *ssm, FpDevice *_dev)
deinitsm_1001_run_state,
DEINITSM_1001_NUM_STATES);
break;
+
+ default:
+ g_assert_not_reached ();
}
self->capturing = FALSE;
fpi_ssm_start_subsm (ssm, deinitsm);
@@ -1441,6 +1450,9 @@ dev_activate (FpImageDevice *dev)
ssm = fpi_ssm_new (FP_DEVICE (dev), initsm_1001_run_state,
INITSM_1001_NUM_STATES);
break;
+
+ default:
+ g_assert_not_reached ();
}
fpi_ssm_start (ssm, initsm_complete);
}
--
2.24.1