Skip to content

Commit

Permalink
Hopefully, this will remove warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Sep 20, 2024
1 parent 1580ae7 commit 9e97f99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/apps/others/ojph_img_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,16 @@ namespace ojph {
if (comp_num == 0)
{
si64 loc = start_of_data;
loc += (size_t)(height-1 - cur_line) * num_comps * width * sizeof(float);
loc += (size_t)(height-1 - cur_line) * (size_t)num_comps
* (size_t)width * sizeof(float);
if (ojph_fseek(fh, loc, SEEK_SET) != 0)
{
close();
OJPH_ERROR(0x03000061, "Error seeking in file %s", fname);
}
size_t result =
fread(temp_buf, sizeof(float), (size_t)num_comps * (size_t)width, fh);
if (result != num_comps * width)
if (result != (size_t)num_comps * (size_t)width)
{
close();
OJPH_ERROR(0x03000062, "Not enough data in file %s", fname);
Expand Down

0 comments on commit 9e97f99

Please sign in to comment.