From fc641e2bde96dd2204df3528c9dbd7671658f176 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 8 Dec 2015 14:58:09 +0300 Subject: [PATCH] Coverity: uninitialized values in ExifEntry_t structure --- modules/imgcodecs/src/jpeg_exif.cpp | 6 ++++++ modules/imgcodecs/src/jpeg_exif.hpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/modules/imgcodecs/src/jpeg_exif.cpp b/modules/imgcodecs/src/jpeg_exif.cpp index c7b5b76a26..d10ad55540 100644 --- a/modules/imgcodecs/src/jpeg_exif.cpp +++ b/modules/imgcodecs/src/jpeg_exif.cpp @@ -52,6 +52,12 @@ namespace { namespace cv { +ExifEntry_t::ExifEntry_t() : + field_float(0), field_double(0), field_u32(0), field_s32(0), + tag(0), field_u16(0), field_s16(0), field_u8(0), field_s8(0) +{ +} + /** * @brief ExifReader constructor */ diff --git a/modules/imgcodecs/src/jpeg_exif.hpp b/modules/imgcodecs/src/jpeg_exif.hpp index 9ca1381679..c8502c5c87 100644 --- a/modules/imgcodecs/src/jpeg_exif.hpp +++ b/modules/imgcodecs/src/jpeg_exif.hpp @@ -111,6 +111,8 @@ typedef std::pair u_rational_t; */ struct ExifEntry_t { + ExifEntry_t(); + std::vector field_u_rational; ///< vector of rational fields std::string field_str; ///< any kind of textual information