opencv-2.4.6.1/build/modules/imgproc/precomp.hpp:69: possible bad assert ? (Bug #3346)


Added by David Binderman over 11 years ago. Updated over 11 years ago.


Status:Done Start date:2013-10-25
Priority:Normal Due date:
Assignee:Roman Donchenko % Done:

100%

Category:build/install
Target version:2.4.8
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty:Easy HW Platform:x64
Pull request:

Description

I just compiled opencv with gcc flag -Wlogical-op

It said

opencv-2.4.6.1/build/modules/imgproc/precomp.hpp:69:49: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

Source code is

#define CV_FAST_CAST_8U(t) (assert(-256 <= (t) || (t) <= 512), icvSaturate8u_cv[(t)+256])

Suggest swap || for &&.

I checked your latest sources and the bug also seems to exist there.


Associated revisions

Revision 7a8bd316
Added by Steven Puttemans over 11 years ago

Fixed bug in report #3346

Revision 40efd17b
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3346 from Nerei:fixed_memory_leak_in_viz

History

Updated by Dmitry Retinskiy over 11 years ago

Hi David,

thanks for the ticket.
We would appreciate if you could create a pull request to speed up review and fix of the problem.
Thanks.

  • Status changed from New to Open
  • Target version changed from 2.4.7 to 2.4.8

Updated by Dinar Ahmatnurov over 11 years ago

Hi David! Any updates?

  • Assignee set to Roman Donchenko

Updated by Dinar Ahmatnurov over 11 years ago

  • Category set to build/install

Updated by Steven Puttemans over 11 years ago

Pull request for path added. Will keep you guys up to date of the result.
https://github.com/Itseez/opencv/pull/1843

  • % Done changed from 0 to 50

Updated by Steven Puttemans over 11 years ago

https://github.com/Itseez/opencv/pull/1853

New pull request rebased to 2.4 since it should be applied there.

Updated by Steven Puttemans over 11 years ago

  • Status changed from Open to Done
  • % Done changed from 50 to 100

Also available in: Atom PDF