fpcmoc: Avoid dead-store

Fixes the CI test_scan_build

libfprint/drivers/fpcmoc/fpc.c:275 — [deadcode.DeadStores]
warning: Value stored to 'data' during its initialization is never read
  CommandData *data = fpi_ssm_get_data (ssm);

Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
Daniel Schaefer
2026-05-20 11:10:47 +08:00
committed by Marco Trevisan
parent 7111218427
commit 8a2123ce6a
+2 -1
View File
@@ -272,13 +272,14 @@ static void
fpc_cmd_ssm_done (FpiSsm *ssm, FpDevice *dev, GError *error) fpc_cmd_ssm_done (FpiSsm *ssm, FpDevice *dev, GError *error)
{ {
FpiDeviceFpcMoc *self = FPI_DEVICE_FPCMOC (dev); FpiDeviceFpcMoc *self = FPI_DEVICE_FPCMOC (dev);
CommandData *data = fpi_ssm_get_data (ssm); CommandData *data;
self->cmd_ssm = NULL; self->cmd_ssm = NULL;
/* Notify about the SSM failure from here instead. */ /* Notify about the SSM failure from here instead. */
if (error) if (error)
{ {
fp_err ("%s error: %s ", G_STRFUNC, error->message); fp_err ("%s error: %s ", G_STRFUNC, error->message);
data = fpi_ssm_get_data (ssm);
if (data->callback) if (data->callback)
data->callback (self, NULL, error); data->callback (self, NULL, error);
} }