mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 12:24:58 +00:00
index: Silence type-punned warning
This commit is contained in:
parent
780bea6e26
commit
356f11feea
@ -807,6 +807,7 @@ static int is_index_extended(git_index *index)
|
||||
|
||||
static int write_disk_entry(git_filebuf *file, git_index_entry *entry)
|
||||
{
|
||||
void *mem = NULL;
|
||||
struct entry_short *ondisk;
|
||||
size_t path_len, disk_size;
|
||||
char *path;
|
||||
@ -818,9 +819,11 @@ static int write_disk_entry(git_filebuf *file, git_index_entry *entry)
|
||||
else
|
||||
disk_size = short_entry_size(path_len);
|
||||
|
||||
if (git_filebuf_reserve(file, (void **)&ondisk, disk_size) < GIT_SUCCESS)
|
||||
if (git_filebuf_reserve(file, &mem, disk_size) < GIT_SUCCESS)
|
||||
return GIT_ENOMEM;
|
||||
|
||||
ondisk = (struct entry_short *)mem;
|
||||
|
||||
memset(ondisk, 0x0, disk_size);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user