warning due to contrib/retina.hpp (Bug #1565)


Added by Boris Mansencal about 13 years ago. Updated about 13 years ago.


Status:Done Start date:
Priority:Low Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:legacy, contrib
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

When I compile code with OpenCv and gcc -Wall -Wextra, I get the following warning :

.../include/opencv2/contrib/retina.hpp:332:117: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

It comes from :

const bool _convertCvMat2ValarrayBuffer(const cv::Mat inputMatToConvert, std::valarray<float> &outputValarrayMatrix);

The return type should be "bool" and not "const bool"

It is on svn truk version 7212.

Boris.


Associated revisions

Revision 26ed1099
Added by Alexander Shishkov about 13 years ago

fixed #1565 issue

Revision 744f4b16
Added by Roman Donchenko over 11 years ago

Merge pull request #1565 from SpecLad:cmake-new-ptr

History

Updated by Alexander Shishkov about 13 years ago

Thank you for your response.
I changed it in 7263 revision.

It is good style (see "Effective C++" Meyers), it helps to prevent such errors:
_convertCvMat2ValarrayBuffer(...) = true;

But current compilers are not supported it, so I removed const here.

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Updated by Andrey Kamaev about 13 years ago

  • Target version set to 2.4.0
  • Description changed from When I compile code with [[OpenCv]] and gcc -Wall -Wextra, I get the followin... to When I compile code with OpenCv and gcc -Wall -Wextra, I get the following wa... More
  • Category set to legacy, contrib

Also available in: Atom PDF