[Bf-blender-cvs] [32f58c0a92c] blender-v3.4-release: Cleanup: fix compiler warning with openjpeg 2.5

Brecht Van Lommel noreply at git.blender.org
Tue Nov 8 14:33:28 CET 2022


Commit: 32f58c0a92cfc56e6986c073a83aac8afc97fba4
Author: Brecht Van Lommel
Date:   Tue Nov 8 13:04:08 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB32f58c0a92cfc56e6986c073a83aac8afc97fba4

Cleanup: fix compiler warning with openjpeg 2.5

===================================================================

M	source/blender/imbuf/intern/jp2.c

===================================================================

diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index d2b94355f85..f3d6d19cb8d 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -885,7 +885,10 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
   memset(&cmptparm, 0, sizeof(opj_image_cmptparm_t[4]));
   for (i = 0; i < numcomps; i++) {
     cmptparm[i].prec = prec;
+    /* Deprecated in openjpeg 2.5. */
+#if (OPJ_VERSION_MAJOR < 2) || (OPJ_VERSION_MAJOR == 2 && OPJ_VERSION_MINOR < 5)
     cmptparm[i].bpp = prec;
+#endif
     cmptparm[i].sgnd = 0;
     cmptparm[i].dx = subsampling_dx;
     cmptparm[i].dy = subsampling_dy;



More information about the Bf-blender-cvs mailing list