Skip to content

Commit

Permalink
make bitfields in structs unsigned
Browse files Browse the repository at this point in the history
Fixes warnings like

../imap/jmap_mail.c:1705:32: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingl
t-bitfield-constant-conversion]
            val->want_expunged = 1;
                               ^ ~
  • Loading branch information
dilyanpalauzov committed Aug 19, 2023
1 parent bb6a880 commit cce5de0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion imap/append.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct appendstate {
/* mailbox we're appending to */
struct mailbox *mailbox;
/* do we own it? */
int close_mailbox_when_done:1;
unsigned int close_mailbox_when_done:1;
int myrights;
char userid[MAX_MAILBOX_BUFFER];

Expand Down
4 changes: 2 additions & 2 deletions imap/jmap_mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -1854,8 +1854,8 @@ struct emailsearch_folders_value {
strarray_t foldernames;
bitvector_t foldernums;
int jmapupload_foldernum;
int is_otherthan : 1;
int want_expunged : 1;
unsigned int is_otherthan : 1;
unsigned int want_expunged : 1;
};

static void emailsearch_folders_value_free(struct emailsearch_folders_value **valp)
Expand Down
4 changes: 2 additions & 2 deletions imap/pop3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ static struct msg {
uint32_t uid;
uint32_t recno;
uint32_t size;
int deleted:1;
int seen:1;
unsigned int deleted:1;
unsigned int seen:1;
} *popd_map = NULL;

static struct io_count *io_count_start;
Expand Down

0 comments on commit cce5de0

Please sign in to comment.