Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
--HG--
branch : HEAD
  • Loading branch information
bcully committed Apr 11, 2007
1 parent e94747c commit b1afe93
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
2007-04-10 17:40 -0700 Brendan Cully <brendan@kublai.com> (8082e4c9f524)
2007-04-10 19:19 -0700 Brendan Cully <brendan@kublai.com> (ddd38b4cf15c)

* hcache.c: Refactor mutt_hcache_open to share more code

* hcache.c: Save some stats when header cache already exists

* hcache.c, imap/imap.c, imap/imap_private.h, imap/message.c,
imap/util.c: Make IMAP header cache layout match body cache. You can
Expand Down
1 change: 0 additions & 1 deletion bcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ static int bcache_path(ACCOUNT *account, const char *mailbox,
char *dst, size_t dstlen)
{
char host[STRING];
char *s, *p;
ciss_url_t url;
size_t len;

Expand Down
3 changes: 0 additions & 3 deletions imap/imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1567,9 +1567,6 @@ IMAP_STATUS* imap_mboxcache_get (IMAP_DATA* idata, const char* mbox, int create)
IMAP_STATUS scache;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
ciss_url_t url;
char urlstr[LONG_STRING];
char cpath[LONG_STRING];
unsigned int *uidvalidity = NULL;
unsigned int *uidnext = NULL;
#endif
Expand Down
2 changes: 1 addition & 1 deletion imap/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ header_cache_t* imap_hcache_open (IMAP_DATA* idata, const char* path)
char mbox[LONG_STRING];

if (imap_parse_path (idata->ctx->path, &mx) < 0)
return -1;
return NULL;

if (path)
imap_cachepath (idata, path, mbox, sizeof (mbox));
Expand Down
6 changes: 4 additions & 2 deletions lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,11 +866,14 @@ void mutt_remove_trailing_ws (char *s)
char *mutt_concatn_path (char *dst, size_t dstlen,
const char *dir, size_t dirlen, const char *fname, size_t fnamelen)
{
size_t req;
size_t offset = 0;

if (dstlen == 0)
return NULL; /* probably should not mask errors like this */

/* size check */
size_t req = dirlen + fnamelen + 1; /* +1 for the trailing nul */
req = dirlen + fnamelen + 1; /* +1 for the trailing nul */
if (dirlen && fnamelen)
req++; /* when both components are non-nul, we add a "/" in between */
if (req > dstlen) { /* check for condition where the dst length is too short */
Expand All @@ -884,7 +887,6 @@ char *mutt_concatn_path (char *dst, size_t dstlen,
return NULL;
}

size_t offset = 0;
if (dirlen) { /* when dir is not empty */
memcpy(dst, dir, dirlen);
offset = dirlen;
Expand Down

0 comments on commit b1afe93

Please sign in to comment.