summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2019-04-08 17:40:59 -0400
committerAllen Winter <allen.winter@kdab.com>2019-04-08 17:40:59 -0400
commitca274e3f394c29099439fe47c78be4dab0ad9b67 (patch)
treef8767ffb055b750c28b9464ca1c0982aab097ffc /src
parent99b991cc05252d9234e46bb344f9a8e9c4011043 (diff)
downloadlibical-git-ca274e3f394c29099439fe47c78be4dab0ad9b67.tar.gz
icalrecur.c - minor compile warning and coding style
Diffstat (limited to 'src')
-rw-r--r--src/libical/icalrecur.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
index 735c28df..f7a65e66 100644
--- a/src/libical/icalrecur.c
+++ b/src/libical/icalrecur.c
@@ -2681,7 +2681,7 @@ static int next_year(icalrecur_iterator *impl)
return next_yearday(impl, &__next_year);
}
-static void daymask_find_next_bit(unsigned long days[], short* p_days_index) {
+static void daymask_find_next_bit(unsigned long days[], short *p_days_index) {
unsigned long v;
short startBitIndex;
@@ -2692,7 +2692,7 @@ static void daymask_find_next_bit(unsigned long days[], short* p_days_index) {
// Prepare the first word, where searching might not start at the beginning
startBitIndex = *p_days_index + ICAL_YEARDAYS_MASK_OFFSET;
- wordIdx = startBitIndex / BITS_PER_LONG;
+ wordIdx = (int)(startBitIndex / BITS_PER_LONG);
v = days[wordIdx];
v >>= startBitIndex % BITS_PER_LONG;
@@ -2719,13 +2719,12 @@ static void daymask_find_next_bit(unsigned long days[], short* p_days_index) {
// position yet. Do a b-search to find it.
unsigned long mask;
- int maskSize = BITS_PER_LONG / 2;
+ int maskSize = (int)(BITS_PER_LONG / 2);
mask = (((unsigned long)1) << maskSize) - 1;
while (maskSize) {
- if ((v & mask) == 0)
- {
+ if ((v & mask) == 0) {
v >>= maskSize;
*p_days_index += maskSize;
}