]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: convert string constant to string_view 37125/head
authorKefu Chai <kchai@redhat.com>
Sun, 13 Sep 2020 15:12:02 +0000 (23:12 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 13 Sep 2020 15:32:10 +0000 (23:32 +0800)
commit48dae7010e961cc61ac44a72fec9164f4d039112
tree3525971afada92d8aedc5429aa69ddf4f76757a9
parent85b5db0cce17dcf0125215a0e619b727d53fa26c
rgw: convert string constant to string_view

instead of converting string constant to char*, construct string_views
from string constants

to silence GCC warnings like:

src/rgw/services/svc_sys_obj_cache.cc:512:7: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
  512 |     { "cache list name=filter,type=CephString,req=false",
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/services/svc_sys_obj_cache.cc