Commit e2c1ea6b e2c1ea6b47fff810407d417858809db2ad0d6024 by Sergey Poznyakoff

Fix format strings

1 parent 881a0c31
......@@ -1157,7 +1157,7 @@ fetch_io (mu_stream_t stream, unsigned long start, unsigned long end,
offset = 0;
if (max)
{
util_send (" {%u}\r\n", max);
util_send (" {%lu}\r\n", max);
while (mu_stream_read (rfc, buffer, sizeof (buffer) - 1, offset,
&n) == 0 && n > 0)
{
......@@ -1453,7 +1453,7 @@ fetch_send_address (const char *addr)
return RESP_OK;
}
util_send ("(", count);
util_send ("(");
for (i = 1; i <= count; i++)
{
const char *str;
......
......@@ -108,7 +108,7 @@ imap4d_select_status ()
/* This outputs EXISTS and RECENT responses */
imap4d_sync();
util_out (RESP_OK, "[UIDVALIDITY %d] UID valididy status", uidvalidity);
util_out (RESP_OK, "[UIDVALIDITY %lu] UID valididy status", uidvalidity);
util_out (RESP_OK, "[UIDNEXT %d] Predicted next uid", uidnext);
if (unseen)
util_out (RESP_OK, "[UNSEEN %d] first unseen messsage ", unseen);
......
......@@ -164,7 +164,7 @@ status_uidvalidity (mu_mailbox_t smbox)
{
unsigned long uidvalidity = 0;
util_uidvalidity (smbox, &uidvalidity);
util_send ("UIDVALIDITY %u", uidvalidity);
util_send ("UIDVALIDITY %lu", uidvalidity);
return 0;
}
......
......@@ -196,7 +196,7 @@ main (int argc, char **argv)
{
if ((rc = mu_mailbox_create_default (&input, NULL)) != 0)
{
mu_error (_("Cannot create default mailbox"),
mu_error (_("Cannot create default mailbox: %s"),
mu_strerror (rc));
exit (1);
}
......
......@@ -240,12 +240,13 @@ make_dir_hier (const char *p, mode_t perm)
if (errno != ENOENT)
{
mu_error (_("Cannot create directory %s: error accessing name component %s: %s"),
dir, strerror (errno));
p, dir, strerror (errno));
rc = 1;
}
else if ((rc = mkdir (dir, perm)))
mu_error (_("Cannot create directory %s: error creating name component %s: %s"),
dir, rc);
p, dir, mu_strerror (rc));
}
*q = '/';
}
......@@ -805,7 +806,8 @@ mh_install (char *name, int automode)
else
{
mu_error(_("You already have file %s which is not a regular file or a symbolic link.\n"
"Please remove it and try again"));
"Please remove it and try again"),
name);
exit (1);
}
}
......@@ -990,7 +992,7 @@ mh_draft_message (const char *name, const char *msgspec, char **pname)
{
rc = mu_mailbox_uidnext (mbox, &uid);
if (rc)
mu_error (_("Cannot obtain sequence number for the new message"),
mu_error (_("Cannot obtain sequence number for the new message: %s"),
mu_strerror (rc));
}
else
......
......@@ -208,7 +208,7 @@ write_bulletin_db (size_t num)
DBM_FILE db;
DBM_DATUM key, data;
int rc;
char *p;
const char *p;
rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_RDWR, 0660);
if (rc)
......@@ -224,7 +224,7 @@ write_bulletin_db (size_t num)
MU_DATUM_PTR (key) = username;
MU_DATUM_SIZE (key) = strlen (username);
p = mu_umaxtostr (0, num);
MU_DATUM_PTR (data) = p;
MU_DATUM_PTR (data) = (char *) p;
MU_DATUM_SIZE (data) = strlen (p);
rc = mu_dbm_insert (db, key, data, 1);
......