Skip to content

Commit

Permalink
conversations.c: add a cast needed to silence an error in clang
Browse files Browse the repository at this point in the history
buf_putc wants a char (no specified sign), and we're passing an int with
the high bit very intentionally set.  We need to cast the resulting
expression to (char).
  • Loading branch information
rjbs authored and rsto committed Jan 15, 2025
1 parent 662d749 commit 3bbcc93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imap/conversations.c
Original file line number Diff line number Diff line change
Expand Up @@ -2267,15 +2267,15 @@ static int conversations_guid_setitem(struct conversations_state *state,
if (add) {
struct buf val = BUF_INITIALIZER;
if (state->folders_byname) {
buf_putc(&val, 0x80 | CONV_GUIDREC_BYNAME_VERSION);
buf_putc(&val, (char) (0x80 | CONV_GUIDREC_BYNAME_VERSION));
buf_appendbit64(&val, cid);
buf_appendbit32(&val, system_flags);
buf_appendbit32(&val, internal_flags);
buf_appendbit64(&val, (bit64)internaldate);
}
/* When bumping the G value version, make sure to update _guid_cb */
else {
buf_putc(&val, 0x80 | CONV_GUIDREC_VERSION);
buf_putc(&val, (char) (0x80 | CONV_GUIDREC_VERSION));
buf_appendbit64(&val, cid);
buf_appendbit32(&val, system_flags);
buf_appendbit32(&val, internal_flags);
Expand Down

0 comments on commit 3bbcc93

Please sign in to comment.