Skip to content

Commit

Permalink
Initialize the variable that may not be assigned a value
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryforce authored and TurboGit committed Feb 4, 2025
1 parent d769530 commit 3b7bbfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/imageio/imageio_tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with darktable. If not, see <http://www.gnu.org/licenses/>.
*/

#include "imageio_tiff.h"
#include "common/colorspaces.h"
#include "common/darktable.h"
Expand Down Expand Up @@ -368,7 +369,10 @@ dt_imageio_retval_t dt_imageio_open_tiff(dt_image_t *img, const char *filename,
tiff_t t;
uint16_t config;
uint16_t photometric;
uint16_t inkset;

// This variable may not be assigned a value in TIFFGetField because
// the corresponding tag is optional, so we must initialize this variable.
uint16_t inkset = 0;

t.image = img;

Expand Down

0 comments on commit 3b7bbfa

Please sign in to comment.