Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix warnings #3421

Merged
merged 1 commit into from
Jan 13, 2023
Merged

build: fix warnings #3421

merged 1 commit into from
Jan 13, 2023

Conversation

tomoaki0705
Copy link
Contributor

@tomoaki0705 tomoaki0705 commented Jan 13, 2023

Pull Request Readiness Checklist

similar to #3417, but this one starts from 4.x

FilterMode, cudaTextureAddressMode, cudaTextureReadMode)’:
/opencv_contrib/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp:254:99: warning: declaration of ‘xoff’ shadows a member of ‘cv::cudev::TextureOff<T, R>’ [-Wshadow]
  254 |             const cudaTextureAddressMode addressMode = cudaAddressModeClamp, const cudaTextureReadMode readMode = cudaReadModeElementType) :
      |                                                                                                   ^
/opencv_contrib/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp:267:14: note: shadowed declaration is here
  267 |         int xoff = 0;
      |             ^~~~
/opencv_contrib/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp:254:99: warning: declaration of ‘yoff’ shadows a member of ‘cv::cudev::TextureOff<T, R>’ [-Wshadow]
  254 |             const cudaTextureAddressMode addressMode = cudaAddressModeClamp, const cudaTextureReadMode readMode = cudaReadModeElementType) :
      |                                                                                                   ^
/opencv_contrib/modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp:268:5: note: shadowed declaration is here
  268 |         int yoff = 0;
      |             ^~~~

For the warning message below, I'm not that sure if it makes impact on performance

/opencv_contrib/modules/xfeatures2d/src/cuda/surf.cu(237): warning: dynamic initialization in unreachable code
          detected during:
            instantiation of "__nv_bool cv::cuda::device::surf::Mask<useMask>::check(int, int, int) [with useMask=false]" 
(302): here
            instantiation of "void cv::cuda::device::surf::icvFindMaximaInLayer(T, cv::cuda::PtrStepf, cv::cuda::PtrStepf, int4 *, unsigned int *) [with T=cv::cuda::device::surf::Mask<false>]" 
(376): here

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
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=Custom
buildworker:Custom=linux-1
docker_image:Custom=ubuntu-cuda:16.04

@opencv-pushbot opencv-pushbot merged commit 9331902 into opencv:4.x Jan 13, 2023
@tomoaki0705 tomoaki0705 deleted the fix_warnings_4x branch January 13, 2023 15:32
@alalek alalek mentioned this pull request Jan 18, 2023
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.

None yet

3 participants