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, ...@@ -1157,7 +1157,7 @@ fetch_io (mu_stream_t stream, unsigned long start, unsigned long end,
1157 offset = 0; 1157 offset = 0;
1158 if (max) 1158 if (max)
1159 { 1159 {
1160 util_send (" {%u}\r\n", max); 1160 util_send (" {%lu}\r\n", max);
1161 while (mu_stream_read (rfc, buffer, sizeof (buffer) - 1, offset, 1161 while (mu_stream_read (rfc, buffer, sizeof (buffer) - 1, offset,
1162 &n) == 0 && n > 0) 1162 &n) == 0 && n > 0)
1163 { 1163 {
...@@ -1453,7 +1453,7 @@ fetch_send_address (const char *addr) ...@@ -1453,7 +1453,7 @@ fetch_send_address (const char *addr)
1453 return RESP_OK; 1453 return RESP_OK;
1454 } 1454 }
1455 1455
1456 util_send ("(", count); 1456 util_send ("(");
1457 for (i = 1; i <= count; i++) 1457 for (i = 1; i <= count; i++)
1458 { 1458 {
1459 const char *str; 1459 const char *str;
......
...@@ -108,7 +108,7 @@ imap4d_select_status () ...@@ -108,7 +108,7 @@ imap4d_select_status ()
108 108
109 /* This outputs EXISTS and RECENT responses */ 109 /* This outputs EXISTS and RECENT responses */
110 imap4d_sync(); 110 imap4d_sync();
111 util_out (RESP_OK, "[UIDVALIDITY %d] UID valididy status", uidvalidity); 111 util_out (RESP_OK, "[UIDVALIDITY %lu] UID valididy status", uidvalidity);
112 util_out (RESP_OK, "[UIDNEXT %d] Predicted next uid", uidnext); 112 util_out (RESP_OK, "[UIDNEXT %d] Predicted next uid", uidnext);
113 if (unseen) 113 if (unseen)
114 util_out (RESP_OK, "[UNSEEN %d] first unseen messsage ", unseen); 114 util_out (RESP_OK, "[UNSEEN %d] first unseen messsage ", unseen);
......
...@@ -164,7 +164,7 @@ status_uidvalidity (mu_mailbox_t smbox) ...@@ -164,7 +164,7 @@ status_uidvalidity (mu_mailbox_t smbox)
164 { 164 {
165 unsigned long uidvalidity = 0; 165 unsigned long uidvalidity = 0;
166 util_uidvalidity (smbox, &uidvalidity); 166 util_uidvalidity (smbox, &uidvalidity);
167 util_send ("UIDVALIDITY %u", uidvalidity); 167 util_send ("UIDVALIDITY %lu", uidvalidity);
168 return 0; 168 return 0;
169 } 169 }
170 170
......
...@@ -196,7 +196,7 @@ main (int argc, char **argv) ...@@ -196,7 +196,7 @@ main (int argc, char **argv)
196 { 196 {
197 if ((rc = mu_mailbox_create_default (&input, NULL)) != 0) 197 if ((rc = mu_mailbox_create_default (&input, NULL)) != 0)
198 { 198 {
199 mu_error (_("Cannot create default mailbox"), 199 mu_error (_("Cannot create default mailbox: %s"),
200 mu_strerror (rc)); 200 mu_strerror (rc));
201 exit (1); 201 exit (1);
202 } 202 }
......
...@@ -240,12 +240,13 @@ make_dir_hier (const char *p, mode_t perm) ...@@ -240,12 +240,13 @@ make_dir_hier (const char *p, mode_t perm)
240 if (errno != ENOENT) 240 if (errno != ENOENT)
241 { 241 {
242 mu_error (_("Cannot create directory %s: error accessing name component %s: %s"), 242 mu_error (_("Cannot create directory %s: error accessing name component %s: %s"),
243 dir, strerror (errno)); 243
244 p, dir, strerror (errno));
244 rc = 1; 245 rc = 1;
245 } 246 }
246 else if ((rc = mkdir (dir, perm))) 247 else if ((rc = mkdir (dir, perm)))
247 mu_error (_("Cannot create directory %s: error creating name component %s: %s"), 248 mu_error (_("Cannot create directory %s: error creating name component %s: %s"),
248 dir, rc); 249 p, dir, mu_strerror (rc));
249 } 250 }
250 *q = '/'; 251 *q = '/';
251 } 252 }
...@@ -805,7 +806,8 @@ mh_install (char *name, int automode) ...@@ -805,7 +806,8 @@ mh_install (char *name, int automode)
805 else 806 else
806 { 807 {
807 mu_error(_("You already have file %s which is not a regular file or a symbolic link.\n" 808 mu_error(_("You already have file %s which is not a regular file or a symbolic link.\n"
808 "Please remove it and try again")); 809 "Please remove it and try again"),
810 name);
809 exit (1); 811 exit (1);
810 } 812 }
811 } 813 }
...@@ -990,7 +992,7 @@ mh_draft_message (const char *name, const char *msgspec, char **pname) ...@@ -990,7 +992,7 @@ mh_draft_message (const char *name, const char *msgspec, char **pname)
990 { 992 {
991 rc = mu_mailbox_uidnext (mbox, &uid); 993 rc = mu_mailbox_uidnext (mbox, &uid);
992 if (rc) 994 if (rc)
993 mu_error (_("Cannot obtain sequence number for the new message"), 995 mu_error (_("Cannot obtain sequence number for the new message: %s"),
994 mu_strerror (rc)); 996 mu_strerror (rc));
995 } 997 }
996 else 998 else
......
...@@ -208,7 +208,7 @@ write_bulletin_db (size_t num) ...@@ -208,7 +208,7 @@ write_bulletin_db (size_t num)
208 DBM_FILE db; 208 DBM_FILE db;
209 DBM_DATUM key, data; 209 DBM_DATUM key, data;
210 int rc; 210 int rc;
211 char *p; 211 const char *p;
212 212
213 rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_RDWR, 0660); 213 rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_RDWR, 0660);
214 if (rc) 214 if (rc)
...@@ -224,7 +224,7 @@ write_bulletin_db (size_t num) ...@@ -224,7 +224,7 @@ write_bulletin_db (size_t num)
224 MU_DATUM_PTR (key) = username; 224 MU_DATUM_PTR (key) = username;
225 MU_DATUM_SIZE (key) = strlen (username); 225 MU_DATUM_SIZE (key) = strlen (username);
226 p = mu_umaxtostr (0, num); 226 p = mu_umaxtostr (0, num);
227 MU_DATUM_PTR (data) = p; 227 MU_DATUM_PTR (data) = (char *) p;
228 MU_DATUM_SIZE (data) = strlen (p); 228 MU_DATUM_SIZE (data) = strlen (p);
229 229
230 rc = mu_dbm_insert (db, key, data, 1); 230 rc = mu_dbm_insert (db, key, data, 1);
......