Skip to content

Commit

Permalink
Undo the warning fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Jul 30, 2024
1 parent 253c2cc commit 843bb60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blosc/blosc2-stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ int64_t blosc2_stdio_mmap_write(const void *ptr, int64_t size, int64_t nitems, i
}

if (mmap_file->mapping_size < mmap_file->file_size) {
int64_t old_mapping_size = mmap_file->mapping_size;
mmap_file->mapping_size = mmap_file->file_size * 2;

#if defined(__linux__)
/* mremap is the best option as it also ensures that the old data is still available in c mode. Unfortunately, it
is no POSIX standard and only available on Linux */
int64_t old_mapping_size = mmap_file->mapping_size;
char* new_address = mremap(mmap_file->addr, old_mapping_size, mmap_file->mapping_size, MREMAP_MAYMOVE);
#else
if (mmap_file->is_memory_only) {
Expand Down

0 comments on commit 843bb60

Please sign in to comment.