]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/rgw_rest: do not set unused variable
authorKefu Chai <kchai@redhat.com>
Mon, 16 Aug 2021 09:26:09 +0000 (17:26 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 16 Aug 2021 09:26:10 +0000 (17:26 +0800)
commit164fb13fc93680d92adebdc0115ae0c546db84d3
tree454c0d4cde430e83c6c72ab362bd56f49079f7fc
parent436e9309ed0d09da254c843509ac395d625a9e3e
rgw/rgw_rest: do not set unused variable

`len` is used to track the total length of received data, but we already
collect the data in `bl`, so we can always check `bl` for the total
length. this change also silences following warning from Clang:

../src/rgw/rgw_rest.cc:1477:21: warning: variable 'len' set but not used [-Wunused-but-set-variable]
  int read_len = 0, len = 0;
                    ^
1 warning generated.

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