}
const std::size_t in_file_size = static_cast<size_t>(ftell_val);
- fseek(m_in_file, 0, SEEK_SET);
+ res = fseek(m_in_file, 0, SEEK_SET);
+ if (0 != res) {
+ return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Reading JPEG file failed",
+ ("fseek failed with error! [%d]", res));
+ }
+
- LoggerD("JPEG file: [%s] size:%d", path.c_str(), in_file_size);
+ LoggerD("JPEG file: [%s] size: %zu", path.c_str(), in_file_size);
if (0 == in_file_size) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "JPEG file is invalid",
("Input file [%s] is empty!", path.c_str()));