mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
Fix some strict 32-bit gcc warnings
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
ff87046354
commit
53e525c4f3
@ -960,7 +960,9 @@ int _alpm_archive_fgets(struct archive *a, struct archive_read_buffer *b)
|
||||
b->line_size = b->block_size + 1;
|
||||
b->line_offset = b->line;
|
||||
} else {
|
||||
size_t new = eol ? (eol - b->block_offset) : block_remaining;
|
||||
/* note: we know eol > b->block_offset and b->line_offset > b->line,
|
||||
* so we know the result is unsigned and can fit in size_t */
|
||||
size_t new = eol ? (size_t)(eol - b->block_offset) : block_remaining;
|
||||
size_t needed = (size_t)((b->line_offset - b->line) + new + 1);
|
||||
if(needed > b->max_line_size) {
|
||||
b->ret = -ERANGE;
|
||||
|
@ -347,7 +347,8 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
|
||||
{
|
||||
alpm_pgpkey_t *key = data1;
|
||||
char created[12];
|
||||
strftime(created, 12, "%Y-%m-%d", localtime(&(key->created)));
|
||||
time_t time = (time_t)key->created;
|
||||
strftime(created, 12, "%Y-%m-%d", localtime(&time));
|
||||
*response = yesno(_(":: Import PGP key %s, \"%s\", created %s?"),
|
||||
key->fingerprint, key->uid, created);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user