Skip to content

Commit

Permalink
Fix calloc-transposed-args warning
Browse files Browse the repository at this point in the history
This is a gcc warning: tinyexr.h:4926:12: note: earlier argument should
specify number of elements, later size of each element

Simply flipping the arguments fixes the warning
  • Loading branch information
karjonas committed May 10, 2024
1 parent 6b8b66f commit 38ba5b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinyexr.h
Original file line number Diff line number Diff line change
Expand Up @@ -4923,7 +4923,7 @@ static int DecodeTiledLevel(EXRImage* exr_image, const EXRHeader* exr_header,
}
#endif
exr_image->tiles = static_cast<EXRTile*>(
calloc(sizeof(EXRTile), static_cast<size_t>(num_tiles)));
calloc(static_cast<size_t>(num_tiles), sizeof(EXRTile)));

#if TINYEXR_HAS_CXX11 && (TINYEXR_USE_THREAD > 0)
std::vector<std::thread> workers;
Expand Down

0 comments on commit 38ba5b1

Please sign in to comment.