Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct opj_stepsize
- {
- OPJ_UINT32 expn;
- OPJ_UINT32 mant;
- };
- bool j2k_read_SQcd_SQcc(
- opj_j2k_t *p_j2k,
- OPJ_UINT32 p_comp_no,
- OPJ_BYTE* p_header_data,
- OPJ_UINT32 * p_header_size,
- struct opj_event_mgr * p_manager
- )
- {
- ....
- OPJ_UINT32 l_band_no;
- ....
- l_tccp->stepsizes[l_band_no].expn =
- ((l_tccp->stepsizes[0].expn) - ((l_band_no - 1) / 3) > 0) ?
- (l_tccp->stepsizes[0].expn) - ((l_band_no - 1) / 3) : 0;
- ....
- }
- This suspicious code was found in OpenJPEG project by PVS-Studio static code analyzer.
- Warning message is:
- V555 The expression of the 'A - B > 0' kind will work as 'A != B'. itkopenjpeg j2k.c 3421
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment