Uncrustify with newer version

This commit is contained in:
Benjamin Berg 2020-06-02 13:55:19 +02:00 committed by Benjamin Berg
parent 8ba29606bb
commit e4f9935706
6 changed files with 19 additions and 0 deletions

View file

@ -207,6 +207,7 @@ elan_save_img_frame (FpiDeviceElan *elandev)
unsigned int frame_size = elandev->frame_width * elandev->frame_height; unsigned int frame_size = elandev->frame_width * elandev->frame_height;
unsigned short *frame = g_malloc (frame_size * sizeof (short)); unsigned short *frame = g_malloc (frame_size * sizeof (short));
elan_save_frame (elandev, frame); elan_save_frame (elandev, frame);
unsigned int sum = 0; unsigned int sum = 0;
@ -244,6 +245,7 @@ elan_process_frame_linear (unsigned short *raw_frame,
G_DEBUG_HERE (); G_DEBUG_HERE ();
unsigned short min = 0xffff, max = 0; unsigned short min = 0xffff, max = 0;
for (int i = 0; i < frame_size; i++) for (int i = 0; i < frame_size; i++)
{ {
if (raw_frame[i] < min) if (raw_frame[i] < min)
@ -255,6 +257,7 @@ elan_process_frame_linear (unsigned short *raw_frame,
g_assert (max != min); g_assert (max != min);
unsigned short px; unsigned short px;
for (int i = 0; i < frame_size; i++) for (int i = 0; i < frame_size; i++)
{ {
px = raw_frame[i]; px = raw_frame[i];
@ -278,6 +281,7 @@ elan_process_frame_thirds (unsigned short *raw_frame,
unsigned short lvl0, lvl1, lvl2, lvl3; unsigned short lvl0, lvl1, lvl2, lvl3;
unsigned short *sorted = g_malloc (frame_size * sizeof (short)); unsigned short *sorted = g_malloc (frame_size * sizeof (short));
memcpy (sorted, raw_frame, frame_size * sizeof (short)); memcpy (sorted, raw_frame, frame_size * sizeof (short));
qsort (sorted, frame_size, sizeof (short), cmp_short); qsort (sorted, frame_size, sizeof (short), cmp_short);
lvl0 = sorted[0]; lvl0 = sorted[0];
@ -287,6 +291,7 @@ elan_process_frame_thirds (unsigned short *raw_frame,
g_free (sorted); g_free (sorted);
unsigned short px; unsigned short px;
for (int i = 0; i < frame_size; i++) for (int i = 0; i < frame_size; i++)
{ {
px = raw_frame[i]; px = raw_frame[i];
@ -509,6 +514,7 @@ elan_stop_capture (FpDevice *dev)
FpiSsm *ssm = FpiSsm *ssm =
fpi_ssm_new (dev, stop_capture_run_state, STOP_CAPTURE_NUM_STATES); fpi_ssm_new (dev, stop_capture_run_state, STOP_CAPTURE_NUM_STATES);
fpi_ssm_start (ssm, stop_capture_complete); fpi_ssm_start (ssm, stop_capture_complete);
} }
@ -619,6 +625,7 @@ elan_capture (FpDevice *dev)
elan_dev_reset_state (self); elan_dev_reset_state (self);
FpiSsm *ssm = FpiSsm *ssm =
fpi_ssm_new (dev, capture_run_state, CAPTURE_NUM_STATES); fpi_ssm_new (dev, capture_run_state, CAPTURE_NUM_STATES);
fpi_ssm_start (ssm, capture_complete); fpi_ssm_start (ssm, capture_complete);
} }
@ -797,6 +804,7 @@ elan_calibrate (FpDevice *dev)
FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (dev), calibrate_run_state, FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (dev), calibrate_run_state,
CALIBRATE_NUM_STATES); CALIBRATE_NUM_STATES);
fpi_ssm_start (ssm, calibrate_complete); fpi_ssm_start (ssm, calibrate_complete);
} }
@ -892,6 +900,7 @@ elan_activate (FpImageDevice *dev)
FpiSsm *ssm = FpiSsm *ssm =
fpi_ssm_new (FP_DEVICE (dev), activate_run_state, fpi_ssm_new (FP_DEVICE (dev), activate_run_state,
ACTIVATE_NUM_STATES); ACTIVATE_NUM_STATES);
fpi_ssm_start (ssm, activate_complete); fpi_ssm_start (ssm, activate_complete);
} }

View file

@ -206,6 +206,7 @@ parse_get_enrolled_users_report (bmkt_msg_resp_t *msg_resp, bmkt_response_t *res
get_enroll_templates_resp->query_sequence = extract8 (msg_resp->payload, &offset); get_enroll_templates_resp->query_sequence = extract8 (msg_resp->payload, &offset);
int n = 0; int n = 0;
for (n = 0; n < BMKT_MAX_NUM_TEMPLATES_INTERNAL_FLASH; n++) for (n = 0; n < BMKT_MAX_NUM_TEMPLATES_INTERNAL_FLASH; n++)
{ {
if (offset >= msg_resp->payload_len) if (offset >= msg_resp->payload_len)

View file

@ -242,6 +242,7 @@ prepare_image (FpDeviceVfs0050 *vdev)
/* Building GSList */ /* Building GSList */
GSList *lines = NULL; GSList *lines = NULL;
for (int i = height - 1; i >= 0; --i) for (int i = height - 1; i >= 0; --i)
lines = g_slist_prepend (lines, vdev->lines_buffer + i); lines = g_slist_prepend (lines, vdev->lines_buffer + i);
@ -669,6 +670,7 @@ dev_activate (FpImageDevice *idev)
self->ssm_active = 1; self->ssm_active = 1;
FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (idev), activate_ssm, SSM_STATES); FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (idev), activate_ssm, SSM_STATES);
fpi_ssm_start (ssm, dev_activate_callback); fpi_ssm_start (ssm, dev_activate_callback);
} }
@ -712,6 +714,7 @@ dev_open (FpImageDevice *idev)
/* Clearing previous device state */ /* Clearing previous device state */
FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (idev), activate_ssm, SSM_STATES); FpiSsm *ssm = fpi_ssm_new (FP_DEVICE (idev), activate_ssm, SSM_STATES);
fpi_ssm_start (ssm, dev_open_callback); fpi_ssm_start (ssm, dev_open_callback);
} }

View file

@ -252,6 +252,7 @@ dev_init (FpImageDevice *dev)
g_autoptr(GSocketListener) listener = NULL; g_autoptr(GSocketListener) listener = NULL;
FpDeviceVirtualImage *self = FPI_DEVICE_VIRTUAL_IMAGE (dev); FpDeviceVirtualImage *self = FPI_DEVICE_VIRTUAL_IMAGE (dev);
const char *env; const char *env;
g_autoptr(GSocketAddress) addr = NULL; g_autoptr(GSocketAddress) addr = NULL;
G_DEBUG_HERE (); G_DEBUG_HERE ();

View file

@ -1493,6 +1493,7 @@ test_driver_list (void)
g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new (); g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new ();
FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device); FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device);
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device); FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
g_autoptr(GPtrArray) prints = g_ptr_array_new_with_free_func (g_object_unref); g_autoptr(GPtrArray) prints = g_ptr_array_new_with_free_func (g_object_unref);
unsigned int i; unsigned int i;
@ -1515,6 +1516,7 @@ test_driver_list_error (void)
g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new (); g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new ();
FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device); FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device);
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device); FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
g_autoptr(GPtrArray) prints = NULL; g_autoptr(GPtrArray) prints = NULL;
fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_GENERAL); fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_GENERAL);

View file

@ -1172,6 +1172,7 @@ test_ssm_subssm_start (void)
g_autoptr(FpiSsm) subssm = g_autoptr(FpiSsm) subssm =
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM"); ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
FpiSsmTestData *data = fpi_ssm_get_data (ssm); FpiSsmTestData *data = fpi_ssm_get_data (ssm);
g_autoptr(FpiSsmTestData) subdata = g_autoptr(FpiSsmTestData) subdata =
fpi_ssm_test_data_ref (fpi_ssm_get_data (subssm)); fpi_ssm_test_data_ref (fpi_ssm_get_data (subssm));
@ -1262,6 +1263,7 @@ test_ssm_subssm_start_with_started (void)
g_autoptr(FpiSsm) subssm = g_autoptr(FpiSsm) subssm =
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM"); ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
FpiSsmTestData *data = fpi_ssm_get_data (ssm); FpiSsmTestData *data = fpi_ssm_get_data (ssm);
g_autoptr(FpiSsmTestData) subdata = g_autoptr(FpiSsmTestData) subdata =
fpi_ssm_test_data_ref (fpi_ssm_get_data (subssm)); fpi_ssm_test_data_ref (fpi_ssm_get_data (subssm));
@ -1305,6 +1307,7 @@ test_ssm_subssm_start_with_delayed (void)
g_autoptr(FpiSsm) subssm = g_autoptr(FpiSsm) subssm =
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM"); ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
FpiSsmTestData *data = fpi_ssm_get_data (ssm); FpiSsmTestData *data = fpi_ssm_get_data (ssm);
g_autoptr(FpiSsmTestData) subdata = g_autoptr(FpiSsmTestData) subdata =
fpi_ssm_test_data_ref (fpi_ssm_get_data (subssm)); fpi_ssm_test_data_ref (fpi_ssm_get_data (subssm));
gpointer timeout_tracker = GUINT_TO_POINTER (TRUE); gpointer timeout_tracker = GUINT_TO_POINTER (TRUE);