Skip to content

Commit

Permalink
fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pjstevns committed Mar 17, 2019
1 parent bd32a9d commit b009ca3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/dm_imapsession.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ static int _imap_show_body_section(body_fetch *bodyfetch, gpointer data)
break;
case BFIT_HEADER_FIELDS_NOT:
condition=TRUE;
// fall-through
case BFIT_HEADER_FIELDS:
_fetch_headers(self, bodyfetch, condition);
break;
Expand Down
12 changes: 8 additions & 4 deletions src/dm_mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,8 @@ static GTree * mailbox_search(DbmailMailbox *self, search_key *s)
db_stmt_set_int(st, 2, MESSAGE_STATUS_NEW);
db_stmt_set_int(st, 3, MESSAGE_STATUS_SEEN);
memset(partial,0,sizeof(partial));
snprintf(partial, DEF_FRAGSIZE-1, "%%%s%%", s->search);
if (snprintf(partial, DEF_FRAGSIZE-1, "%%%s%%", s->search) < 0)
abort();
db_stmt_set_str(st, 4, partial);

break;
Expand Down Expand Up @@ -1334,7 +1335,8 @@ static GTree * mailbox_search(DbmailMailbox *self, search_key *s)
db_stmt_set_int(st, 2, MESSAGE_STATUS_NEW);
db_stmt_set_int(st, 3, MESSAGE_STATUS_SEEN);
memset(partial,0,sizeof(partial));
snprintf(partial, DEF_FRAGSIZE-1, "%%%s%%", s->search);
if (snprintf(partial, DEF_FRAGSIZE-1, "%%%s%%", s->search) < 0)
abort();
db_stmt_set_str(st, 4, partial);
db_stmt_set_str(st, 5, partial);

Expand Down Expand Up @@ -1378,7 +1380,9 @@ static GTree * mailbox_search(DbmailMailbox *self, search_key *s)
db_stmt_set_int(st, 2, MESSAGE_STATUS_NEW);
db_stmt_set_int(st, 3, MESSAGE_STATUS_SEEN);
memset(partial,0,sizeof(partial));
snprintf(partial, DEF_FRAGSIZE-1, "%%%s%%", s->search);
if (snprintf(partial, DEF_FRAGSIZE-1, "%%%s%%", s->search) < 0)
abort();

db_stmt_set_str(st, 4, partial);

break;
Expand Down Expand Up @@ -1512,7 +1516,7 @@ static GTree * mailbox_search(DbmailMailbox *self, search_key *s)
END_TRY;

if (inset)
g_free(inset);
g_free((char *)inset);

p_string_free(q,TRUE);
g_string_free(t,TRUE);
Expand Down
1 change: 1 addition & 0 deletions src/dm_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ char * dm_shellesc(const char * command)
case '!':
// Add an escape before the offending char.
safe_command[end++] = '\\';
// fall-through
default:
// And then put in the character itself.
safe_command[end++] = command[pos];
Expand Down

0 comments on commit b009ca3

Please sign in to comment.