* <many> fix small conversion errors (-Wconversion)

This commit is contained in:
Dirk-Jan C. Binnema
2010-09-26 17:29:54 +03:00
parent 3fa552a81e
commit fb1651e184
11 changed files with 70 additions and 46 deletions

View File

@ -38,16 +38,17 @@ save_numbered_parts (MuMsg *msg, MuConfigOptions *opts)
for (rv = TRUE, cur = parts; cur && *cur; ++cur) {
int idx;
unsigned idx;
int i;
char *endptr;
idx = (int)strtol (*cur, &endptr, 10);
if (idx < 0 || *cur == endptr) {
idx = (unsigned)(i = strtol (*cur, &endptr, 10));
if (i < 0 || *cur == endptr) {
g_warning ("invalid MIME-part index '%s'", *cur);
rv = FALSE;
break;
}
if (!mu_msg_mime_part_save
(msg, idx, opts->targetdir, opts->overwrite)) {
g_warning ("failed to save MIME-part %d", idx);