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

fixes for g++ and clang++ compiler warnings #158

Merged
merged 4 commits into from
Jun 4, 2018

Conversation

dalgaaf
Copy link
Collaborator

@dalgaaf dalgaaf commented May 30, 2018

-Wshadow

  • add noreturn attribute
  • fix typename
  • fix deprecation in rados lib correclty

rados-metadata-storage-ima.cpp:39:19: warning: declaration shadows a static data member of 'librmb::RadosMetadataStorageIma' [-Wshadow]
      std::string keyword_key;
                  ^
rados-metadata-storage-ima.cpp:18:38: note: previous declaration is here
std::string RadosMetadataStorageIma::keyword_key = "K";
                                     ^

Signed-off-by: Danny Al-Gaaf <[email protected]>
rmb.cpp:193:26: warning: function 'usage_exit' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
static void usage_exit() {
                         ^

Signed-off-by: Danny Al-Gaaf <[email protected]>
dict-rados.cpp:625:12: error: expected a qualified name after 'typename'
  typename map<string, bufferlist>::iterator map_iter;
           ^
dict-rados.cpp:625:12: error: duplicate member 'map'
dict-rados.cpp:624:32: note: previous declaration is here
  std::map<string, bufferlist> map;
                               ^
dict-rados.cpp:625:15: error: expected ';' at end of declaration list
  typename map<string, bufferlist>::iterator map_iter;
              ^

Signed-off-by: Danny Al-Gaaf <[email protected]>
Fix for:

rados-util.cpp:101:14: warning: 'omap_get_keys' is deprecated [-Wdeprecated-declarations]
  first_read.omap_get_keys("", LONG_MAX, &extended_keys, &err);
             ^
/usr/include/rados/librados.hpp:594:52: note: 'omap_get_keys' has been explicitly marked deprecated here
                       int *prval) __attribute__ ((deprecated)); // use v2
                                                   ^
dict-rados.cpp:713:27: warning: 'omap_get_vals' is deprecated [-Wdeprecated-declarations]
          private_read_op.omap_get_vals("", k, LONG_MAX, &iter->results.back().map, &iter->results.back().rval);
                          ^
/usr/include/rados/librados.hpp:558:35: note: 'omap_get_vals' has been explicitly marked deprecated here
      int *prval) __attribute__ ((deprecated));  // use v2
                                  ^
dict-rados.cpp:740:26: warning: 'omap_get_vals' is deprecated [-Wdeprecated-declarations]
          shared_read_op.omap_get_vals("", k, LONG_MAX, &iter->results.back().map, &iter->results.back().rval);
                         ^
/usr/include/rados/librados.hpp:558:35: note: 'omap_get_vals' has been explicitly marked deprecated here
      int *prval) __attribute__ ((deprecated));  // use v2
                                  ^

Signed-off-by: Danny Al-Gaaf <[email protected]>
@peter-mauritius peter-mauritius merged commit 78f2416 into master Jun 4, 2018
@jrse jrse deleted the wip-da-SCA-20180530 branch September 27, 2022 20:25
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.

2 participants