Skip to content

fix the return-type error in ipp_warpAffine#24153

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
Ginkgo-Biloba:ipp-warp-affine
Aug 15, 2023
Merged

fix the return-type error in ipp_warpAffine#24153
opencv-pushbot merged 1 commit intoopencv:4.xfrom
Ginkgo-Biloba:ipp-warp-affine

Conversation

@Ginkgo-Biloba
Copy link
Copy Markdown
Contributor

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • N/A There is a reference to the original bug report and related work
  • N/A There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • N/A The feature is well documented and sample code can be built with the project CMake
    fix the return-type compile error in ipp_warpAffine

When building OpenCV on Windows with MSVC, if we set cmake option WITH_IPP ON and BUILD_IPP_IW OFF, then we have macro HAVE_IPP / HAVE_IPP_ICV but no HAVE_IPP_IW / HAVE_IPP_IW_LL in cvconfig.h, thus the function ipp_warpAffine will have an empty body (no return), but its signature returns bool.

Just add return false and apply CV_UNUSED to all its arguments, like what other ipp_* functions do.

The compile error on my PC is:

F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2622,118): warning C4100: 'flags': unreferenced formal parameter
F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2622,110): warning C4100: '_M': unreferenced formal parameter
F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2622,87): warning C4100: 'borderType': unreferenced formal parameter
F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2622,68): warning C4100: 'interpolation': unreferenced formal parameter
F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2622,58): warning C4100: '_dst': unreferenced formal parameter
F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2622,40): warning C4100: '_src': unreferenced formal parameter
F:\Library\opencv\modules\imgproc\src\imgwarp.cpp(2683): error C4716: 'cv::ipp_warpAffine': must return a value

@mshabunin
Copy link
Copy Markdown
Contributor

Reproduced and verified on Ubuntu 22.04 (warnings shown).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants