Skip to content

Commit

Permalink
Addresses a couple of warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Nov 10, 2024
1 parent bca572f commit dd011ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/apps/common/ojph_img_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ namespace ojph {
ui32 bit_depth_of_data[4];
ui32 bytes_per_sample;
ui8* buffer;
ui32 buffer_size;
size_t buffer_size;
ui32 cur_line, samples_per_line;
};
#endif /* OJPH_ENABLE_TIFF_SUPPORT */
Expand Down
4 changes: 2 additions & 2 deletions src/apps/others/ojph_img_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ namespace ojph {
OJPH_ERROR(0x030000B3, "unable to open file %s for writing", filename);
}

buffer_size = (size_t)width * num_components * (size_t)bytes_per_sample;
buffer_size = width * (size_t)num_components * (size_t)bytes_per_sample;
buffer = (ui8*)malloc(buffer_size);
fname = filename;
cur_line = 0;
Expand Down Expand Up @@ -1626,7 +1626,7 @@ namespace ojph {
}

bytes_per_sample = (bit_depth + 7) >> 3;
buffer_size = (size_t)width * bytes_per_sample;
buffer_size = width * bytes_per_sample;
buffer = (ui8*)malloc(buffer_size);
}

Expand Down

0 comments on commit dd011ac

Please sign in to comment.