mirror of
https://github.com/facebook/zstd.git
synced 2025-10-10 00:03:36 -04:00
Visual compiler bug work-around
This commit is contained in:
parent
be34969e5c
commit
9df49dc50a
@ -647,7 +647,7 @@ FileNamesTable* UTIL_createFNT_fromROTable(const char** filenames, size_t nbFile
|
|||||||
size_t const sizeof_FNTable = nbFilenames * sizeof(*filenames);
|
size_t const sizeof_FNTable = nbFilenames * sizeof(*filenames);
|
||||||
const char** const newFNTable = (const char**)malloc(sizeof_FNTable);
|
const char** const newFNTable = (const char**)malloc(sizeof_FNTable);
|
||||||
if (newFNTable==NULL) return NULL;
|
if (newFNTable==NULL) return NULL;
|
||||||
memcpy(newFNTable, filenames, sizeof_FNTable);
|
memcpy((void*)newFNTable, filenames, sizeof_FNTable); /* void* : mitigate a Visual compiler bug or limitation */
|
||||||
return UTIL_createFileNamesTable(newFNTable, nbFilenames, NULL);
|
return UTIL_createFileNamesTable(newFNTable, nbFilenames, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user