From 0711635a7449707c4e77ff1073856781aa309995 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 18 Nov 2019 10:17:34 -0600 Subject: size_t -> int in is_slot_early() This commit updates the crate, card, and channel variables in is_slot_early() to be ints instead of size_ts. The reason is I saw a warning when building with clang and realized that the abs(card - flasher_card) == 1 check wasn't working if flasher_card was 1 greater than card because I was using unsigned ints. --- src/dc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dc.c b/src/dc.c index 05a8010..0dadfc7 100644 --- a/src/dc.c +++ b/src/dc.c @@ -683,8 +683,8 @@ int is_slot_early(event *ev, int flasher_pmt_id) double flasher_pos[3]; double pmt_dir[3]; double distance; - size_t crate, card, channel; - size_t flasher_crate, flasher_card, flasher_channel; + int crate, card, channel; + int flasher_crate, flasher_card, flasher_channel; flasher_crate = flasher_pmt_id/512; flasher_card = (flasher_pmt_id % 512)/32; -- cgit