Fix shadow warnings#1953
Open
fspindle wants to merge 77 commits into
Open
Conversation
visp/modules/core/src/image/vpFont.cpp:353:20: warning: declaration shadows a local variable [-Wshadow]
353 | for (int x = d_x; x < d_x + d_w; x++) {
| ^
visp/modules/core/src/image/vpFont.cpp:338:23: note: previous declaration is here
338 | for (int i = 0, x = 0; i < wordUTF32_size; i++) {
| ^
visp/modules/core/src/image/vpFont.cpp:467:20: warning: declaration shadows a local variable [-Wshadow]
467 | for (int x = d_x; x < d_x + d_w; x++) {
| ^
visp/modules/core/src/image/vpFont.cpp:452:23: note: previous declaration is here
452 | for (int i = 0, x = 0; i < wordUTF32_size; i++) {
| ^
visp/modules/core/src/math/matrix/vpMatrix_qr.cpp:515:12: warning: declaration shadows a local variable [-Wshadow]
515 | size_t len = sizeof(double) * Q.colNum;
| ^
visp/modules/core/src/math/matrix/vpMatrix_qr.cpp:483:10: note: previous declaration is here
483 | size_t len = sizeof(double) * colNum;
| ^
visp/modules/tracker/dnn/src/vpMegaPose.cpp:572:10: warning: declaration shadows a local variable [-Wshadow]
572 | json j;
| ^
visp/modules/tracker/dnn/src/vpMegaPose.cpp:568:8: note: previous declaration is here
568 | json j;
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:163:12: warning: declaration shadows a local variable [-Wshadow]
163 | for (int i = hMin; i < hist_size; ++i) {
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:153:7: note: previous declaration is here
153 | int i = 0;
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:173:12: warning: declaration shadows a local variable [-Wshadow]
173 | for (int i = 0; i < transfer_size; ++i) {
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:153:7: note: previous declaration is here
153 | int i = 0;
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:196:12: warning: declaration shadows a local variable [-Wshadow]
196 | for (int i = hMin; i <= v; ++i) {
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:185:7: note: previous declaration is here
185 | int i = 0;
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:201:12: warning: declaration shadows a local variable [-Wshadow]
201 | for (int i = v + 1; i < clippedHistLength; ++i) {
| ^
visp/modules/imgproc/src/vpCLAHE.cpp:185:7: note: previous declaration is here
185 | int i = 0;
| ^
visp/modules/tracker/me/src/moving-edges/vpMeEllipse_least_square.cpp:219:14: warning: declaration shadows a local variable [-Wshadow]
219 | double x = xp[i];
| ^
visp/modules/tracker/me/src/moving-edges/vpMeEllipse_least_square.cpp:183:15: note: previous declaration is here
183 | vpColVector x(3);
| ^
…-Wshadow]
visp/modules/io/test/video/catchVideo.cpp:66:87: warning: declaration shadows a variable in the global namespace [-Wshadow]
66 | bool test_createSequence(vpImage<Type> &I, const std::string &videoname, unsigned int first_frame, int frame_step,
| ^
visp/modules/io/test/video/catchVideo.cpp:57:13: note: previous declaration is here
57 | static long first_frame = 100;
| ^
visp/modules/io/test/video/catchVideo.cpp:66:104: warning: declaration shadows a variable in the global namespace [-Wshadow]
66 | bool test_createSequence(vpImage<Type> &I, const std::string &videoname, unsigned int first_frame, int frame_step,
| ^
visp/modules/io/test/video/catchVideo.cpp:58:12: note: previous declaration is here
58 | static int frame_step = 2;
| ^
visp/modules/io/test/video/catchVideo.cpp:67:39: warning: declaration shadows a variable in the global namespace [-Wshadow]
67 | unsigned int nframes)
| ^
visp/modules/io/test/video/catchVideo.cpp:59:21: note: previous declaration is here
59 | static unsigned int nframes = 3;
| ^
visp/modules/io/test/video/catchVideo.cpp:89:77: warning: declaration shadows a variable in the global namespace [-Wshadow]
89 | bool test_readSequence(vpImage<Type> &I, const std::string &videoname, long first_frame, int frame_step, int step,
| ^
visp/modules/io/test/video/catchVideo.cpp:57:13: note: previous declaration is here
57 | static long first_frame = 100;
| ^
visp/modules/io/test/video/catchVideo.cpp:89:94: warning: declaration shadows a variable in the global namespace [-Wshadow]
89 | bool test_readSequence(vpImage<Type> &I, const std::string &videoname, long first_frame, int frame_step, int step,
| ^
visp/modules/io/test/video/catchVideo.cpp:58:12: note: previous declaration is here
58 | static int frame_step = 2;
| ^
visp/modules/io/test/video/catchVideo.cpp:90:29: warning: declaration shadows a variable in the global namespace [-Wshadow]
90 | long last_frame)
| ^
visp/modules/io/test/video/catchVideo.cpp:60:13: note: previous declaration is here
60 | static long last_frame = first_frame + static_cast<long>(frame_step) * (nframes - 1);
| ^
visp/modules/io/test/video/catchVideo.cpp:133:28: warning: declaration shadows a local variable [-Wshadow]
133 | vpImage<unsigned char> I;
| ^
visp/modules/io/test/video/catchVideo.cpp:127:26: note: previous declaration is here
127 | vpImage<unsigned char> I(2, 4, 0);
| ^
visp/modules/io/test/video/catchVideo.cpp:140:28: warning: declaration shadows a local variable [-Wshadow]
140 | vpImage<unsigned char> I;
| ^
visp/modules/io/test/video/catchVideo.cpp:127:26: note: previous declaration is here
127 | vpImage<unsigned char> I(2, 4, 0);
| ^
visp/modules/io/test/video/catchVideo.cpp:154:21: warning: declaration shadows a local variable [-Wshadow]
154 | vpImage<vpRGBa> I;
| ^
visp/modules/io/test/video/catchVideo.cpp:148:19: note: previous declaration is here
148 | vpImage<vpRGBa> I(2, 4);
| ^
visp/modules/io/test/video/catchVideo.cpp:161:21: warning: declaration shadows a local variable [-Wshadow]
161 | vpImage<vpRGBa> I;
| ^
visp/modules/io/test/video/catchVideo.cpp:148:19: note: previous declaration is here
148 | vpImage<vpRGBa> I(2, 4);
| ^
visp/modules/io/test/video/catchVideo.cpp:173:15: warning: declaration shadows a variable in the global namespace [-Wshadow]
173 | std::string tmp = vpIoTools::makeTempDirectory("./");
| ^
visp/modules/io/test/video/catchVideo.cpp:61:44: note: previous declaration is here
61 | VP_ATTRIBUTE_NO_DESTROY static std::string tmp;
| ^
…-Wshadow]
visp/modules/core/test/image-with-dataset/catchColorConversion.cpp:984:7: warning: declaration shadows a variable in the global namespace [-Wshadow]
984 | int height = I_RGBA_8U_ref.getHeight(), width = I_RGBA_8U_ref.getWidth();
| ^
visp/modules/core/test/image-with-dataset/catchColorConversion.cpp:60:40: note: previous declaration is here
60 | static const unsigned int width = 223, height = 151;
| ^
visp/modules/core/test/image-with-dataset/catchColorConversion.cpp:984:43: warning: declaration shadows a variable in the global namespace [-Wshadow]
984 | int height = I_RGBA_8U_ref.getHeight(), width = I_RGBA_8U_ref.getWidth();
| ^
visp/modules/core/test/image-with-dataset/catchColorConversion.cpp:60:27: note: previous declaration is here
60 | static const unsigned int width = 223, height = 151;
| ^
visp/modules/core/test/image-with-dataset/catchColorConversion.cpp:1122:21: warning: declaration shadows a local variable [-Wshadow]
1122 | vpImage<vpRGBa> I_RGBA_8U(I_Bayer_8U.getHeight(), I_Bayer_8U.getWidth());
| ^
visp/modules/core/test/image-with-dataset/catchColorConversion.cpp:983:19: note: previous declaration is here
983 | vpImage<vpRGBa> I_RGBA_8U(I_RGBA_8U_ref.getHeight(), I_RGBA_8U_ref.getWidth());
| ^
…g' [-Wshadow]
visp/modules/visual_features/src/visual-feature/vpFeatureLuminanceMapping.cpp:555:67: warning: declaration shadows a field of 'vpFeatureLuminanceMapping' [-Wshadow]
555 | void vpFeatureLuminanceMapping::buildFrom(vpImage<unsigned char> &I)
| ^
visp/modules/visual_features/include/visp3/visual_features/vpFeatureLuminanceMapping.h:427:26: note: previous declaration is here
427 | vpImage<unsigned char> I;
| ^
visp/modules/core/test/math/catchJsonArrayConversion.cpp:237:21: warning: declaration shadows a local variable [-Wshadow]
237 | for (unsigned j = 0; j < array.getCols(); ++j) {
| ^
visp/modules/core/test/math/catchJsonArrayConversion.cpp:234:10: note: previous declaration is here
234 | json j;
| ^
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1953 +/- ##
==========================================
+ Coverage 48.78% 48.83% +0.04%
==========================================
Files 532 532
Lines 69310 69309 -1
Branches 32412 32413 +1
==========================================
+ Hits 33816 33844 +28
+ Misses 31347 31339 -8
+ Partials 4147 4126 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
visp/modules/core/test/tools/io-with-dataset/testIoTools.cpp:827:9: warning: declaration shadows a local variable [-Wshadow]
827 | int nbFail = 0;
| ^
visp/modules/core/test/tools/io-with-dataset/testIoTools.cpp:149:16: note: previous declaration is here
149 | unsigned int nbFail = 0, nbOk = 0;
| ^
visp/modules/core/test/tools/io-with-dataset/testIoTools.cpp:828:9: warning: declaration shadows a local variable [-Wshadow]
828 | int nbOk = 0;
| ^
visp/modules/core/test/tools/io-with-dataset/testIoTools.cpp:149:28: note: previous declaration is here
149 | unsigned int nbFail = 0, nbOk = 0;
| ^
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:148:15: warning: declaration shadows a local variable [-Wshadow]
148 | for (auto i = 1u; i < W.size(); i++) {
| ^
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:129:9: note: previous declaration is here
129 | int i = 0;
| ^
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:148:15: warning: declaration shadows a local variable [-Wshadow]
148 | for (auto i = 1u; i < W.size(); i++) {
| ^
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:129:9: note: previous declaration is here
129 | int i = 0;
| ^
[ 48%] Building CXX object modules/vision/CMakeFiles/visp_vision.dir/src/pose-estimation/vpPoseRGBD.cpp.o
[ 48%] Building CXX object modules/vision/CMakeFiles/visp_vision.dir/src/pose-estimation/vpPoseRansac.cpp.o
visp/modules/vision/src/pose-estimation/vpPoseDementhon.cpp:439:21: warning: declaration shadows a local variable [-Wshadow]
439 | for (unsigned int i = 0; i < sizeHomogeneous; ++i) {
| ^
visp/modules/vision/src/pose-estimation/vpPoseDementhon.cpp:412:7: note: previous declaration is here
412 | int i = 0;
| ^
visp/modules/vision/src/pose-estimation/vpPoseDementhon.cpp:446:21: warning: declaration shadows a local variable [-Wshadow]
446 | for (unsigned int i = 0; i < npt; ++i) {
| ^
visp/modules/vision/src/pose-estimation/vpPoseDementhon.cpp:412:7: note: previous declaration is here
412 | int i = 0;
| ^
visp/modules/vision/src/pose-estimation/vpPoseRGBD.cpp:233:12: warning: declaration shadows a local variable [-Wshadow]
233 | size_t point3d_size = point3d.size();
| ^
visp/modules/vision/src/pose-estimation/vpPoseRGBD.cpp:176:10: note: previous declaration is here
176 | size_t point3d_size = point3d.size();
| ^
Set m_maxInitPoints=1000 in the default constructor.
visp/modules/tracker/mbt/src/vpMbTracker.cpp:622:22: warning: declaration shadows a field of 'vpMbTracker' [-Wshadow]
622 | const unsigned int m_maxInitPoints = 100; // arbitrary value
| ^
visp/modules/tracker/mbt/include/visp3/mbt/vpMbTracker.h:167:16: note: previous declaration is here
167 | unsigned int m_maxInitPoints;
| ^
visp/modules/tracker/mbt/test/generic-with-dataset/perfGenericTracker.cpp:288:20: warning: declaration shadows a local variable [-Wshadow]
288 | const bool verbose = false;
| ^
visp/modules/tracker/mbt/test/generic-with-dataset/perfGenericTracker.cpp:140:16: note: previous declaration is here
140 | const bool verbose = false;
| ^
In file included from visp/modules/java/generator/src/cpp/visp_java.cpp:4:
In file included from visp-build-shadow/modules/java_bindings_generator/gen/cpp/visp_jni.hpp:5:
visp-build-shadow/modules/java_bindings_generator/gen/cpp/mbt.inl.hpp:2181:21: warning: declaration shadows a local variable [-Wshadow]
2181 | std::string initFiles = convertTo(env, jinit);
| ^
visp-build-shadow/modules/java_bindings_generator/gen/cpp/mbt.inl.hpp:2162:96: note: previous declaration is here
2162 | (JNIEnv* env, jclass , jlong self, jobjectArray cameraNames, jlongArray images, jobjectArray initFiles, jboolean displayHelp, jlongArray Ts)
| ^
visp-build-shadow/modules/java_bindings_generator/gen/cpp/mbt.inl.hpp:2231:21: warning: declaration shadows a local variable [-Wshadow]
2231 | std::string initFiles = convertTo(env, jinit);
| ^
visp-build-shadow/modules/java_bindings_generator/gen/cpp/mbt.inl.hpp:2212:96: note: previous declaration is here
2212 | (JNIEnv* env, jclass , jlong self, jobjectArray cameraNames, jlongArray images, jobjectArray initFiles, jboolean displayHelp, jlongArray Ts)
|
visp-build-shadow/modules/java_bindings_generator/gen/cpp/mbt.inl.hpp:2231:21: warning: declaration shadows a local variable [-Wshadow]
2231 | std::string initFiles = convertTo(env, jinit);
| ^
visp-build-shadow/modules/java_bindings_generator/gen/cpp/mbt.inl.hpp:2212:96: note: previous declaration is here
2212 | (JNIEnv* env, jclass , jlong self, jobjectArray cameraNames, jlongArray images, jobjectArray initFiles, jboolean displayHelp, jlongArray Ts)
|
visp/apps/calibration/intrinsic/visp-calibrate-camera.cpp:1170:25: warning: declaration shadows a local variable [-Wshadow]
1170 | vpImage<vpRGBa> I_save_results;
| ^
visp/apps/calibration/intrinsic/visp-calibrate-camera.cpp:232:21: note: previous declaration is here
232 | vpImage<vpRGBa> I_save_results;
|
visp/example/device/framegrabber/grab1394Two.cpp:485:35: warning: declaration shadows a local variable [-Wshadow]
485 | std::stringstream ss;
| ^
visp/example/device/framegrabber/grab1394Two.cpp:469:31: note: previous declaration is here
469 | std::stringstream ss;
| ^
visp/example/device/framegrabber/grab1394Two.cpp:501:35: warning: declaration shadows a local variable [-Wshadow]
501 | std::stringstream ss;
| ^
visp/example/device/framegrabber/grab1394Two.cpp:469:31: note: previous declaration is here
469 | std::stringstream ss;
| ^
visp/example/tracking/mbtGenericTrackingDepth.cpp:766:31: warning: declaration shadows a local variable [-Wshadow]
766 | std::stringstream ss;
| ^
visp/example/tracking/mbtGenericTrackingDepth.cpp:758:29: note: previous declaration is here
758 | std::stringstream ss;
| ^
visp/tutorial/computer-vision/tutorial-pose-from-planar-object.cpp:319:23: warning: declaration shadows a structured binding [-Wshadow]
319 | for (const auto &[id, keypoint] : keypoints) {
| ^
visp/tutorial/computer-vision/tutorial-pose-from-planar-object.cpp:308:21: note: previous declaration is here
308 | for (const auto &[id, ip_unused] : model.keypoints()) {
| ^
visp/tutorial/detection/tag/tutorial-apriltag-detector-live.cpp:452:27: warning: declaration shadows a local variable [-Wshadow]
452 | std::stringstream ss;
| ^
visp/tutorial/detection/tag/tutorial-apriltag-detector-live.cpp:434:25: note: previous declaration is here
434 | std::stringstream ss;
| ^
visp/tutorial/detection/tag/tutorial-apriltag-detector-live.cpp:468:29: warning: declaration shadows a local variable [-Wshadow]
468 | std::stringstream ss;
| ^
visp/tutorial/detection/tag/tutorial-apriltag-detector-live.cpp:434:25: note: previous declaration is here
434 | std::stringstream ss;
| ^
isp/tutorial/imgproc/brightness/tutorial-brightness-adjustment.cpp:207:21: warning: declaration shadows a local variable [-Wshadow]
207 | vpImage<vpRGBa> I_color_gamma_correction;
| ^
visp/tutorial/imgproc/brightness/tutorial-brightness-adjustment.cpp:186:19: note: previous declaration is here
186 | vpImage<vpRGBa> I_color_gamma_correction;
| ^
visp/tutorial/imgproc/brightness/tutorial-brightness-adjustment.cpp:210:28: warning: declaration shadows a local variable [-Wshadow]
210 | vpImage<unsigned char> I_gray_gamma_correction;
| ^
visp/tutorial/imgproc/brightness/tutorial-brightness-adjustment.cpp:188:26: note: previous declaration is here
188 | vpImage<unsigned char> I_gray_gamma_correction;
| ^
visp/tutorial/mean-drift/tutorial-meandrift.cpp:447:24: warning: declaration shadows a local variable [-Wshadow]
447 | std::vector<float> signal = p_testShewhart->getSignals();
| ^
visp/tutorial/mean-drift/tutorial-meandrift.cpp:398:9: note: previous declaration is here
398 | float signal;
| ^
visp/tutorial/particle-filter/tutorial-pf.cpp:751:23: warning: declaration shadows a local variable [-Wshadow]
751 | for (unsigned int i = 0; i < 3; ++i) {
| ^
visp/tutorial/particle-filter/tutorial-pf.cpp:716:21: note: previous declaration is here
716 | for (unsigned int i = 0; i < nbIter; ++i) {
| ^
visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp:461:27: warning: declaration shadows a local variable [-Wshadow]
461 | std::stringstream ss;
| ^
visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp:437:25: note: previous declaration is here
437 | std::stringstream ss;
| ^
visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp:479:27: warning: declaration shadows a local variable [-Wshadow]
479 | std::stringstream ss;
| ^
visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp:437:25: note: previous declaration is here
437 | std::stringstream ss;
| ^
visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp:513:27: warning: declaration shadows a local variable [-Wshadow]
513 | std::stringstream ss;
| ^
visp/tutorial/tracking/model-based/generic/tutorial-mb-generic-tracker-full.cpp:437:25: note: previous declaration is here
437 | std::stringstream ss;
| ^
…tu’ [-Wshadow]
visp/modules/robot/src/real-robot/pololu-maestro/vpRobotPololuPtu.cpp: In member function ‘virtual void vpRobotPololuPtu::get_fJe(vpMatrix&)’:
visp/modules/robot/src/real-robot/pololu-maestro/vpRobotPololuPtu.cpp:73:42: warning: declaration of ‘fJe’ shadows a member of ‘vpRobotPololuPtu’ [-Wshadow]
73 | void vpRobotPololuPtu::get_fJe(vpMatrix &fJe)
| ~~~~~~~~~~^~~
visp/modules/robot/include/visp3/robot/vpRobot.h:107:12: note: shadowed declaration is here
107 | vpMatrix fJe;
| ^~~
…tu’ [-Wshadow]
visp/modules/robot/src/real-robot/pololu-maestro/vpRobotPololuPtu.cpp: In member function ‘void vpRobotPololuPtu::get_eJe(const vpColVector&, vpMatrix&) const’:
visp/modules/robot/src/real-robot/pololu-maestro/vpRobotPololuPtu.cpp:81:64: warning: declaration of ‘eJe’ shadows a member of ‘vpRobotPololuPtu’ [-Wshadow]
81 | void vpRobotPololuPtu::get_eJe(const vpColVector &q, vpMatrix &eJe) const
| ~~~~~~~~~~^~~
visp/modules/robot/include/visp3/robot/vpRobot.h:103:12: note: shadowed declaration is here
103 | vpMatrix eJe;
| ^~~
…tu’ [-Wshadow]
visp/modules/robot/src/real-robot/pololu-maestro/vpRobotPololuPtu.cpp: In member function ‘void vpRobotPololuPtu::get_fJe(const vpColVector&, vpMatrix&) const’:
visp/modules/robot/src/real-robot/pololu-maestro/vpRobotPololuPtu.cpp:99:64: warning: declaration of ‘fJe’ shadows a member of ‘vpRobotPololuPtu’ [-Wshadow]
99 | void vpRobotPololuPtu::get_fJe(const vpColVector &q, vpMatrix &fJe) const
| ~~~~~~~~~~^~~
visp/modules/robot/include/visp3/robot/vpRobot.h:107:12: note: shadowed declaration is here
107 | vpMatrix fJe;
| ^~~
…iper650’ [-Wshadow]
visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp: In member function ‘void vpRobotViper850::init(vpViper850::vpToolType, vpCameraParameters::vpCameraParametersProjType)’:
visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp:427:104: warning: declaration of ‘projModel’ shadows a member of ‘vpRobotViper850’ [-Wshadow]
427 | void vpRobotViper850::init(vpViper850::vpToolType tool, vpCameraParameters::vpCameraParametersProjType projModel)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from visp/modules/robot/include/visp3/robot/vpRobotViper850.h:48,
from visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp:50:
visp/modules/robot/include/visp3/robot/vpViper850.h:168:50: note: shadowed declaration is here
168 | vpCameraParameters::vpCameraParametersProjType projModel;
| ^~~~~~~~~
visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp: In member function ‘void vpRobotViper650::init(vpViper650::vpToolType, vpCameraParameters::vpCameraParametersProjType)’:
visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp:411:104: warning: declaration of ‘projModel’ shadows a member of ‘vpRobotViper650’ [-Wshadow]
411 | void vpRobotViper650::init(vpViper650::vpToolType tool, vpCameraParameters::vpCameraParametersProjType projModel)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from visp/modules/robot/include/visp3/robot/vpRobotViper650.h:48,
from visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp:50:
visp/modules/robot/include/visp3/robot/vpViper650.h:168:50: note: shadowed declaration is here
168 | vpCameraParameters::vpCameraParametersProjType projModel;
| ^~~~~~~~~
…0’ and ‘vpRobotViper650’ [-Wshadow]
visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp: In member function ‘virtual void vpRobotViper850::get_fJe(vpMatrix&)’:
visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp:1004:41: warning: declaration of ‘fJe’ shadows a member of ‘vpRobotViper850’ [-Wshadow]
1004 | void vpRobotViper850::get_fJe(vpMatrix &fJe)
| ~~~~~~~~~~^~~
visp/modules/robot/include/visp3/robot/vpRobot.h:107:12: note: shadowed declaration is here
107 | vpMatrix fJe;
| ^~~
visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp: In member function ‘virtual void vpRobotViper650::get_fJe(vpMatrix&)’:
visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp:984:41: warning: declaration of ‘fJe’ shadows a member of ‘vpRobotViper650’ [-Wshadow]
984 | void vpRobotViper650::get_fJe(vpMatrix &fJe)
| ~~~~~~~~~~^~~
visp/modules/robot/include/visp3/robot/vpRobot.h:107:12: note: shadowed declaration is here
107 | vpMatrix fJe;
| ^~~
…0’ and ‘vpRobotViper650’ [-Wshadow]
visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp: In member function ‘virtual void vpRobotViper850::get_eJe(vpMatrix&)’:
visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp:970:41: warning: declaration of ‘eJe’ shadows a member of ‘vpRobotViper850’ [-Wshadow]
970 | void vpRobotViper850::get_eJe(vpMatrix &eJe)
| ~~~~~~~~~~^~~
In file included from visp/modules/robot/src/real-robot/viper/vpRobotViper850.cpp:48:
visp/modules/robot/include/visp3/robot/vpRobot.h:103:12: note: shadowed declaration is here
103 | vpMatrix eJe;
| ^~~
visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp: In member function ‘virtual void vpRobotViper650::get_eJe(vpMatrix&)’:
visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp:950:41: warning: declaration of ‘eJe’ shadows a member of ‘vpRobotViper650’ [-Wshadow]
950 | void vpRobotViper650::get_eJe(vpMatrix &eJe)
| ~~~~~~~~~~^~~
In file included from visp/modules/robot/src/real-robot/viper/vpRobotViper650.cpp:48:
visp/modules/robot/include/visp3/robot/vpRobot.h:103:12: note: shadowed declaration is here
103 | vpMatrix eJe;
| ^~~
…rameter [-Wshadow]
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp: In lambda function:
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:77:90: warning: declaration of ‘const vpColVector& weights’ shadows a parameter [-Wshadow]
77 | auto compute_centroid = [=](const std::vector<double> &point_cloud, const vpColVector &weights) {
| ~~~~~~~~~~~~~~~~~~~^~~~~~~
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:68:87: note: shadowed declaration is here
68 | vpPlane estimatePlaneEquationSVD(const std::vector<double> &point_cloud, vpColVector &weights = make_ref(vpColVector {}))
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:77:58: warning: declaration of ‘const std::vector<double>& point_cloud’ shadows a parameter [-Wshadow]
77 | auto compute_centroid = [=](const std::vector<double> &point_cloud, const vpColVector &weights) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:68:61: note: shadowed declaration is here
68 | vpPlane estimatePlaneEquationSVD(const std::vector<double> &point_cloud, vpColVector &weights = make_ref(vpColVector {}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
…r [-Wshadow]
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp: In lambda function:
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:222:64: warning: declaration of ‘const vpPolygon& roi’ shadows a parameter [-Wshadow]
222 | isInside = [](const vpImagePoint &ip, const vpPolygon &roi) { return roi.isInside(ip); };
| ~~~~~~~~~~~~~~~~~^~~
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:208:34: note: shadowed declaration is here
208 | void getHelpers(const vpPolygon &roi, const unsigned int &height, const unsigned int &width,
| ~~~~~~~~~~~~~~~~~^~~
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp: In lambda function:
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:235:62: warning: declaration of ‘const vpPolygon& roi’ shadows a parameter [-Wshadow]
235 | isInside = [](const vpImagePoint &ip, const vpPolygon &roi) { return roi.isInside(ip); };
| ~~~~~~~~~~~~~~~~~^~~
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:208:34: note: shadowed declaration is here
208 | void getHelpers(const vpPolygon &roi, const unsigned int &height, const unsigned int &width,
| ~~~~~~~~~~~~~~~~~^~~
…shadows a parameter [-Wshadow]
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp: In lambda function:
visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:77:58: warning: declaration of ‘const std::vector<double>& point_cloud’ shadows a parameter [-Wshadow]
77 | auto compute_centroid = [=](const std::vector<double> &point_cloud, const vpColVector &w) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/fspindle/soft/visp-ws/test-pr/visp-fspindle/visp/modules/vision/src/plane-estimation/vpPlaneEstimation.cpp:68:61: note: shadowed declaration is here
68 | vpPlane estimatePlaneEquationSVD(const std::vector<double> &point_cloud, vpColVector &weights = make_ref(vpColVector {}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
…eyPoint’ [-Wshadow]
visp/modules/vision/src/key-point/vpKeyPoint.cpp: In member function ‘bool vpKeyPoint::matchPointAndDetect(const vpImage<unsigned char>&, vpRect&, vpImagePoint&, bool, std::vector<vpImagePoint>*, std::vector<vpImagePoint>*, double*, double*, const vpRect&)’:
visp/modules/vision/src/key-point/vpKeyPoint.cpp:3369:78: warning: declaration of ‘detectionScore’ shadows a member of ‘vpKeyPoint’ [-Wshadow]
3369 | double *meanDescriptorDistance, double *detectionScore, const vpRect &rectangle)
| ~~~~~~~~^~~~~~~~~~~~~~
In file included from visp/modules/vision/src/key-point/vpKeyPoint.cpp:45:
visp/modules/vision/include/visp3/vision/vpKeyPoint.h:296:5: note: shadowed declaration is here
296 | detectionScore /*!< Same condition than the previous but with a formula
| ^~~~~~~~~~~~~~
…ation [-Wshadow]
visp/modules/tracker/rbt/src/vo/vpPointMap.cpp: In member function ‘void vpPointMap::getVisiblePoints(unsigned int, unsigned int, const vpCameraParameters&, const vpHomogeneousMatrix&, const vpImage<float>&, std::vector<int>&)’:
visp/modules/tracker/rbt/src/vo/vpPointMap.cpp:202:20: warning: declaration of ‘uint’ shadows a global declaration [-Wshadow]
202 | unsigned int uint = static_cast<unsigned int>(u), vint = static_cast<unsigned int>(v);
| ^~~~
In file included from /usr/include/opencv4/opencv2/core/cvdef.h:190,
from /usr/include/opencv4/opencv2/core.hpp:52,
from /usr/include/opencv4/opencv2/core/core.hpp:48,
from visp/modules/core/include/visp3/core/vpMeterPixelConversion.h:50,
from visp/modules/tracker/rbt/include/visp3/rbt/vpPointMap.h:38,
from visp/modules/tracker/rbt/src/vo/vpPointMap.cpp:31:
/usr/include/opencv4/opencv2/core/hal/interface.h:38:31: note: shadowed declaration is here
38 | typedef std::uint32_t uint;
| ^~~~
[ 55%] Building CXX object modules/mbt/CMakeFiles/visp_mbt.dir/src/edge/vpMbtMeEllipse.cpp.o
visp/modules/tracker/rbt/src/vo/vpPointMap.cpp: In member function ‘void vpPointMap::selectValidNewCandidates(const vpCameraParameters&, const vpHomogeneousMatrix&, const vpArray2D<int>&, const vpMatrix&, const vpImage<float>&, const vpImage<float>&, const vpImage<vpRGBf>&, vpMatrix&, vpMatrix&, std::vector<int>&)’:
visp/modules/tracker/rbt/src/vo/vpPointMap.cpp:258:18: warning: declaration of ‘uint’ shadows a global declaration [-Wshadow]
258 | unsigned int uint = static_cast<unsigned int>(u), vint = static_cast<unsigned int>(v);
| ^~~~
/usr/include/opencv4/opencv2/core/hal/interface.h:38:31: note: shadowed declaration is here
38 | typedef std::uint32_t uint;
| ^~~~
visp/modules/tracker/rbt/src/vo/vpPointMap.cpp:323:37: warning: declaration of ‘oX’ shadows a previous local [-Wshadow]
323 | for (const std::array<double, 3> &oX: validoXList) {
| ^~
visp/modules/tracker/rbt/src/vo/vpPointMap.cpp:241:15: note: shadowed declaration is here
241 | vpColVector oX(3);
| ^~
visp/modules/tracker/rbt/test/catchRBT.cpp: In function ‘void CATCH2_INTERNAL_TEST_91()’:
visp/modules/tracker/rbt/test/catchRBT.cpp:845:18: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
845 | for (int i = -1; i < 2; ++i) {
| ^
visp/modules/tracker/rbt/test/catchRBT.cpp:831:21: note: shadowed declaration is here
831 | for (unsigned int i = 0; i < N; i++) {
|
…adow]
visp/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp: In function ‘int main()’:
visp/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp:307:21: warning: declaration of ‘filename’ shadows a previous local [-Wshadow]
307 | std::string filename = vpIoTools::formatString(logdirname + "/image.%04d.png", it++);
| ^~~~~~~~
visp/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp:169:17: note: shadowed declaration is here
169 | std::string filename = "cd_M_o.dat";
| ^~~~~~~~
…dow]
visp/example/servo-afma6/servoAfma6Cylinder2DCamVelocity.cpp: In function ‘int main(int, char**)’:
visp/example/servo-afma6/servoAfma6Cylinder2DCamVelocity.cpp:304:32: warning: declaration of ‘display’ shadows a previous local [-Wshadow]
304 | std::shared_ptr<vpDisplay> display = vpDisplayFactory::createDisplay(I, 100, 100, "Current image");
| ^~~~~~~
visp/example/servo-afma6/servoAfma6Cylinder2DCamVelocity.cpp:278:30: note: shadowed declaration is here
278 | std::shared_ptr<vpDisplay> display;
| ^~~~~~~
visp/example/servo-franka/servoFrankaIBVS.cpp: In function ‘int main(int, char**)’:
visp/example/servo-franka/servoFrankaIBVS.cpp:443:30: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
443 | vpColVector c_P, p;
| ^
visp/example/servo-franka/servoFrankaIBVS.cpp:338:33: note: shadowed declaration is here
338 | std::vector<vpFeaturePoint> p(4), pd(4); // We use 4 points
| ^
visp/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp:200:20: warning: declaration of ‘cog’ shadows a previous local [-Wshadow]
200 | vpImagePoint cog = dot[i].getCog();
| ^~~
visp/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp:193:18: note: shadowed declaration is here
193 | vpImagePoint cog;
| ^~~
visp/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp:287:24: warning: declaration of ‘cog’ shadows a previous local [-Wshadow]
287 | vpImagePoint cog = dot[i].getCog();
| ^~~
visp/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp:193:18: note: shadowed declaration is here
193 | vpImagePoint cog;
| ^~~
visp/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp:237:23: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
237 | vpColVector cP, p;
| ^
visp/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp:212:20: note: shadowed declaration is here
212 | vpFeaturePoint p[4];
| ^
visp/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp: In function ‘int main()’:
visp/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp:236:23: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
236 | vpColVector cP, p;
| ^
visp/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp:211:20: note: shadowed declaration is here
211 | vpFeaturePoint p[4];
| ^
visp/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp: In function ‘int main()’:
visp/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp:238:23: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
238 | vpColVector cP, p;
| ^
visp/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp:213:20: note: shadowed declaration is here
213 | vpFeaturePoint p[4];
| ^
visp/example/servo-viper850/servoViper850FourPoints2DArtVelocityLs_cur.cpp: In function ‘int main()’:
visp/example/servo-viper850/servoViper850FourPoints2DArtVelocityLs_cur.cpp:244:14: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
244 | for (int i = 0; i < 4; i++) {
| ^
visp/example/servo-viper850/servoViper850FourPoints2DArtVelocityLs_cur.cpp:173:9: note: shadowed declaration is here
173 | int i;
| ^
visp/example/servo-viper850/servoViper850FourPoints2DArtVelocityLs_cur.cpp:245:23: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
245 | vpColVector cP, p;
| ^
visp/example/servo-viper850/servoViper850FourPoints2DArtVelocityLs_cur.cpp:222:20: note: shadowed declaration is here
222 | vpFeaturePoint p[4];
| ^
visp/example/servo-viper850/servoViper850FourPoints2DCamVelocityLs_cur.cpp: In function ‘int main()’:
visp/example/servo-viper850/servoViper850FourPoints2DCamVelocityLs_cur.cpp:245:14: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
245 | for (int i = 0; i < 4; i++) {
| ^
visp/example/servo-viper850/servoViper850FourPoints2DCamVelocityLs_cur.cpp:174:9: note: shadowed declaration is here
174 | int i;
| ^
…s_cur.cpp:246:23: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
246 | vpColVector cP, p;
| ^
visp/example/servo-viper850/servoViper850FourPoints2DCamVelocityLs_cur.cpp:223:20: note: shadowed declaration is here
223 | vpFeaturePoint p[4];
| ^
…shadow]
Typical warning found in multiple files:
visp/example/tools/parallelPort.cpp: In function ‘bool getOptions(int, const char**, unsigned char&)’:
visp/example/tools/parallelPort.cpp:107:15: warning: declaration of ‘optarg’ shadows a global declaration [-Wshadow]
107 | const char *optarg;
| ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/getopt_posix.h:27,
from /usr/include/unistd.h:903,
from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from visp/example/tools/parallelPort.cpp:45:
/usr/include/x86_64-linux-gnu/bits/getopt_core.h:36:14: note: shadowed declaration is here
36 | extern char *optarg;
| ^~~~~~
visp/tutorial/mean-drift/tutorial-meandrift.cpp:445:24: warning: declaration of ‘signal’ shadows a previous local [-Wshadow]
445 | std::vector<float> signal = p_testShewhart->getSignals();
| ^~~~~~
visp/example/servo-viper850/servoViper850FourPointsKinect.cpp: In function ‘int main()’:
visp/example/servo-viper850/servoViper850FourPointsKinect.cpp:256:14: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
256 | for (int i = 0; i < 4; i++) {
| ^
visp/example/servo-viper850/servoViper850FourPointsKinect.cpp:257:23: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
257 | vpColVector cP, p;
| ^
visp/example/servo-viper850/servoViper850FourPointsKinect.cpp:234:20: note: shadowed declaration is here
234 | vpFeaturePoint p[4];
| ^
…ll -Wextra -Wshadow as an error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.