-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
fix more issues from clang(++) and cppchecker #43
Closed
Conversation
This file contains 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
Change declaration of config_option from 'class' to 'struct' since it's defined as struct and used this way (access members). The declaration as class doesn't change the behaviour. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix "Function parameter 'm' should be passed by reference." from cppchecker. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix 'const static struct fuse_lowlevel_ops fuse_ll_oper' related -Wgnu-designator warning from clang(++): client/fuse_ll.cc:537:2: warning: use of GNU old-style field designator extension [-Wgnu-designator] Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix warning for usage of queue.size() in do_queues(). Use empty() since it should be prefered as it has, following the standard, a constant time complexity regardless of the containter type. The same is not guaranteed for size(). warning from cppchecker was: [common/AsyncReserver.h:40]: (performance) Possible inefficient checking for 'queue' emptiness. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix warning for usage of out->size() in _void_dequeue(). Use empty() since it should be prefered as it has, following the standard, a constant time complexity regardless of the containter type. The same is not guaranteed for size(). warning from cppchecker was: [common/WorkQueue.h:97]: (performance) Possible inefficient checking for 'queue' emptiness. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix 'struct ceph_file_layout g_default_file_layout' related -Wgnu-designator warning from clang(++): common/config.cc:61:2: warning: use of GNU old-style field designator extension [-Wgnu-designator] Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix "(performance) Function parameter 's' should be passed by reference." from cppchecker. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Remove unused variable to fix: mon/PGMonitor.cc:170:11: warning: unused variable 'now' [-Wunused-variable] Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix "(performance) Function parameter 'm' should be passed by reference." from cppchecker. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix warning for usage of *.size(). Use empty() since it should be prefered as it has, following the standard, a constant time complexity regardless of the containter type. The same is not guaranteed for size(). warning from cppchecker was: [osd/OSD.h:265]: (performance) Possible inefficient checking for 'last_scrub_pg' emptiness. [osd/OSD.h:274]: (performance) Possible inefficient checking for 'last_scrub_pg' emptiness. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix warning for usage of objects.size(). Use empty() since it should be prefered as it has, following the standard, a constant time complexity regardless of the containter type. The same is not guaranteed for size(). warning from cppchecker was: [osd/PG.h:599]: (performance) Possible inefficient checking for 'objects' emptiness. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix warning from clang(++): test/mon/test_mon_workloadgen.cc:311:23: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu] Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix warning from clang(++): librados/librados.cc:15:17: warning: using directive refers to implicitly-defined namespace 'std' using namespace std; ^ Include what we need and use the related classes. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Close pull request , replaced by pull request #47 |
XinzeChi
pushed a commit
to XinzeChi/ceph
that referenced
this pull request
Jan 29, 2016
osd: misc optimization for map utilization
ddiss
pushed a commit
to ddiss/ceph
that referenced
this pull request
Oct 25, 2016
rgw: add missing metadata_heap pool to old zones
adamemerson
added a commit
to adamemerson/ceph
that referenced
this pull request
Nov 4, 2017
d1ff03b667 Merge pull request ceph#44 from adamemerson/wip-system-includes 4cc4b949ca build: Mark dependency includes as SYSTEM in dmclock 05096c1756 Merge pull request ceph#43 from TaewoongKim/anticipation_conf f356c45461 Add missing anticipation_timeout argument for PullPriorityQueue constructor 9896448ec5 Merge pull request ceph#42 from tchaikov/wip-cmake 979899ef86 add travis CI on gnu/linux 8a3dabdbee cmake: the built archives are located in ${binary_dir} ee15ced3e9 cmake: check for include in /usr/include also git-subtree-dir: src/dmclock git-subtree-split: d1ff03b667d9551478b2803ea533fc356ca441a9
galsalomon66
added a commit
that referenced
this pull request
Jan 14, 2021
…Wunused-variable/ (#43) Signed-off-by: gal salomon <gal.salomon@gmail.com>
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.
Here another set of patches to fix issues found by clang/clang++ and cppcheck. As already send to the ceph-ML for review. Doesn't contain the 2 patches sage commented on (01/15 and 13/15).
Please pull from wip-da-sca-cppcheck-clang.