Skip to content
Snippets Groups Projects
Commit f07b9eb7 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Fix for gcc warning.

* gcc 6.4 does not realize posix_memalign initializes ptr on some
  Linux systems.
parent 9b178896
No related tags found
No related merge requests found
...@@ -184,7 +184,7 @@ initAFiledataFileWriteAtReblock(struct fileMPIFWAR *of, const char *filename, ...@@ -184,7 +184,7 @@ initAFiledataFileWriteAtReblock(struct fileMPIFWAR *of, const char *filename,
of->name = Malloc(nameSize); of->name = Malloc(nameSize);
memcpy(of->name, filename, nameSize); memcpy(of->name, filename, nameSize);
{ {
void *ptr; void *ptr = NULL;
int err = posix_memalign(&ptr, bufBlockAlign, bufSize); int err = posix_memalign(&ptr, bufBlockAlign, bufSize);
if (!err) if (!err)
of->blockBuf = ptr; of->blockBuf = ptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment