@@ -302,7 +302,7 @@ gpujpeg_write_ifd(struct gpujpeg_writer* writer, const uint8_t* start, size_t co
302302 * from tags remove the items that are overriden by custom_tags
303303 */
304304static size_t
305- remove_overriden (size_t count , struct tag_value tags [], const struct custom_exif_tags * custom_tags )
305+ remove_overriden (size_t count , struct tag_value tags [static count ], const struct custom_exif_tags custom_tags [ static 1 ] )
306306{
307307 for ( unsigned i = 0 ; i < custom_tags -> count ; ++ i ) {
308308 for ( unsigned j = 0 ; j < count ; ++ j ) {
@@ -334,7 +334,7 @@ gpujpeg_write_0th(struct gpujpeg_encoder* encoder, const uint8_t* start)
334334 {ETIFF_EXIF_IFD_POINTER , {0 } }, // value will be set later
335335 };
336336 size_t tag_count = ARR_SIZE (tags );
337- const struct custom_exif_tags * custom_tags = NULL ;
337+ const struct custom_exif_tags * custom_tags = & ( struct custom_exif_tags ){ 0 } ;
338338 if (encoder -> writer -> exif_tags != NULL ) {
339339 custom_tags = & encoder -> writer -> exif_tags -> tags [CT_TIFF ];
340340 tag_count = remove_overriden (tag_count , tags , custom_tags );
@@ -354,7 +354,7 @@ static void gpujpeg_write_exif_ifd(struct gpujpeg_encoder* encoder, const uint8_
354354 {EEXIF_PIXEL_Y_DIMENSION , {.uvalue = (uint32_t []){encoder -> coder .param_image .height }}},
355355 };
356356 size_t tag_count = ARR_SIZE (tags );
357- const struct custom_exif_tags * custom_tags = NULL ;
357+ const struct custom_exif_tags * custom_tags = & ( struct custom_exif_tags ){ 0 } ;
358358 if (encoder -> writer -> exif_tags != NULL ) {
359359 custom_tags = & encoder -> writer -> exif_tags -> tags [CT_EXIF ];
360360 tag_count = remove_overriden (tag_count , tags , custom_tags );
0 commit comments