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


Added by Boris Mansencal over 1 year ago. Updated about 1 year ago.


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

0%

Category:legacy, contrib
Target version:2.4.0
Affected version: 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 over 1 year ago

fixed #1565 issue

History

Updated by Alexander Shishkov over 1 year 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
  • Pull request set to fixed

Updated by Andrey Kamaev about 1 year ago

  • Target version set to 2.4.0
  • Category set to legacy, contrib
  • 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

Also available in: Atom PDF