1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

Use correct format specifiers

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Rikard Falkeborn 2015-11-10 20:51:55 +01:00 committed by Allan McRae
parent bf0e8e6b43
commit 9e22e75fa1
7 changed files with 14 additions and 14 deletions

View File

@ -349,7 +349,7 @@ static int check_mountpoint(alpm_handle_t *handle, alpm_mountpoint_t *mp)
(uintmax_t)cushion, (uintmax_t)mp->fsp.f_bfree);
if(needed >= 0 && (fsblkcnt_t)needed > mp->fsp.f_bfree) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("Partition %s too full: %jd blocks needed, %jd blocks free\n"),
_("Partition %s too full: %jd blocks needed, %ju blocks free\n"),
mp->mount_dir, (intmax_t)needed, (uintmax_t)mp->fsp.f_bfree);
return 1;
}

View File

@ -323,7 +323,7 @@ static void curl_set_handle_opts(struct dload_payload *payload,
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
curl_easy_setopt(curl, CURLOPT_TIMEVALUE, (long)st.st_mtime);
_alpm_log(handle, ALPM_LOG_DEBUG,
"using time condition: %lu\n", (long)st.st_mtime);
"using time condition: %ld\n", (long)st.st_mtime);
} else if(stat(payload->tempfile_name, &st) == 0 && payload->allow_resume) {
/* a previous partial download exists, resume from end of file. */
payload->tempfile_openmode = "ab";

View File

@ -599,7 +599,7 @@ static int remove_package_files(alpm_handle_t *handle,
}
}
_alpm_log(handle, ALPM_LOG_DEBUG, "removing %zd files\n", filelist->count);
_alpm_log(handle, ALPM_LOG_DEBUG, "removing %zu files\n", filelist->count);
if(!newpkg) {
/* init progress bar, but only on true remove transactions */

View File

@ -1290,7 +1290,7 @@ void *_alpm_greedy_grow(void **data, size_t *current, const size_t required)
void _alpm_alloc_fail(size_t size)
{
fprintf(stderr, "alloc failure: could not allocate %zd bytes\n", size);
fprintf(stderr, "alloc failure: could not allocate %zu bytes\n", size);
}
/* vim: set noet: */

View File

@ -418,8 +418,8 @@ void cb_question(alpm_question_t *question)
alpm_question_select_provider_t *q = &question->select_provider;
size_t count = alpm_list_count(q->providers);
char *depstring = alpm_dep_compute_string(q->depend);
colon_printf(_n("There is %zd provider available for %s\n",
"There are %zd providers available for %s:\n", count),
colon_printf(_n("There is %zu provider available for %s\n",
"There are %zu providers available for %s:\n", count),
count, depstring);
free(depstring);
select_display(q->providers);
@ -443,10 +443,10 @@ void cb_question(alpm_question_t *question)
strftime(created, 12, "%Y-%m-%d", localtime(&time));
if(q->key->revoked) {
q->import = yesno(_("Import PGP key %d%c/%s, \"%s\", created: %s (revoked)?"),
q->import = yesno(_("Import PGP key %u%c/%s, \"%s\", created: %s (revoked)?"),
q->key->length, q->key->pubkey_algo, q->key->fingerprint, q->key->uid, created);
} else {
q->import = yesno(_("Import PGP key %d%c/%s, \"%s\", created: %s?"),
q->import = yesno(_("Import PGP key %u%c/%s, \"%s\", created: %s?"),
q->key->length, q->key->pubkey_algo, q->key->fingerprint, q->key->uid, created);
}
}
@ -590,8 +590,8 @@ void cb_progress(alpm_progress_t event, const char *pkgname, int percent,
}
printf("(%*ld/%*ld) %ls%-*s", digits, (unsigned long)current,
digits, (unsigned long)howmany, wcstr, padwid, "");
printf("(%*zu/%*zu) %ls%-*s", digits, current,
digits, howmany, wcstr, padwid, "");
free(wcstr);

View File

@ -95,8 +95,8 @@ config_t *config_new(void)
config_t *newconfig = calloc(1, sizeof(config_t));
if(!newconfig) {
pm_printf(ALPM_LOG_ERROR,
_n("malloc failure: could not allocate %zd byte\n",
"malloc failure: could not allocate %zd bytes\n", sizeof(config_t)),
_n("malloc failure: could not allocate %zu byte\n",
"malloc failure: could not allocate %zu bytes\n", sizeof(config_t)),
sizeof(config_t));
return NULL;
}

View File

@ -812,7 +812,7 @@ static alpm_list_t *create_verbose_header(size_t count)
alpm_list_t *ret = NULL;
char *header;
pm_asprintf(&header, "%s (%zd)", _("Package"), count);
pm_asprintf(&header, "%s (%zu)", _("Package"), count);
add_table_cell(&ret, header, CELL_TITLE | CELL_FREE);
add_table_cell(&ret, _("Old Version"), CELL_TITLE);
@ -921,7 +921,7 @@ static void _display_targets(alpm_list_t *targets, int verbose)
}
/* print to screen */
pm_asprintf(&str, "%s (%zd)", _("Packages"), alpm_list_count(targets));
pm_asprintf(&str, "%s (%zu)", _("Packages"), alpm_list_count(targets));
printf("\n");
cols = getcols();