1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #27337 from fengyuentau:4x/build/riscv/fix_warnings

build: fix warnings from recent gcc versions #27337

This PR addresses the following found warnings:
- [x] -Wmaybe-uninitialized
- [x] -Wunused-variable
- [x] -Wsign-compare

Tested building with GCC 14.2 (RISC-V 64).

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] 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
This commit is contained in:
Yuantao Feng
2025-05-21 14:28:29 +08:00
committed by GitHub
parent c3fe92d813
commit 166f76d224
8 changed files with 49 additions and 43 deletions
+1 -1
View File
@@ -850,7 +850,7 @@ struct RGB2HLS_b
for ( ; j <= dn*bufChannels - nBlock*bufChannels;
j += nBlock*bufChannels, src += nBlock*4)
{
v_uint8 rgb0, rgb1, rgb2, rgb3, dummy;
v_uint8 rgb0, rgb1, rgb2, dummy;
v_load_deinterleave(src, rgb0, rgb1, rgb2, dummy);
v_uint16 d0,d1,d2,d3,d4,d5;
-1
View File
@@ -769,7 +769,6 @@ template <> int PyrUpVecVOneRow<int, uchar>(int** src, uchar* dst, int width)
r20 = *(row2 + x);
int _2r10 = r10 + r10;
int d = r00 + r20 + (_2r10 + _2r10 + _2r10);
int d_shifted = (r10 + r20) << 2;
// Similar to v_rshr_pack_u<6>(d, vx_setzero_s16()).get0()
*(dst + x) = (int)((((unsigned int)d) + ((1 << (6 - 1)))) >> 6);
}