From 38ba5b10abcadc0c68a60a53ae19a607101c6103 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Fri, 10 May 2024 05:37:58 +0200 Subject: [PATCH] Fix calloc-transposed-args warning 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 --- tinyexr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyexr.h b/tinyexr.h index 537e198..64ee67f 100644 --- a/tinyexr.h +++ b/tinyexr.h @@ -4923,7 +4923,7 @@ static int DecodeTiledLevel(EXRImage* exr_image, const EXRHeader* exr_header, } #endif exr_image->tiles = static_cast( - calloc(sizeof(EXRTile), static_cast(num_tiles))); + calloc(static_cast(num_tiles), sizeof(EXRTile))); #if TINYEXR_HAS_CXX11 && (TINYEXR_USE_THREAD > 0) std::vector workers;