]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/net_handler: do not define variable unless it is used 42137/head
authorKefu Chai <kchai@redhat.com>
Thu, 1 Jul 2021 14:13:45 +0000 (22:13 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 1 Jul 2021 14:16:13 +0000 (22:16 +0800)
commit09067e777e2ae365744548bd7814f0affecf2088
tree04d95a9f5193286181a2c4db2abeb13aed2d3f87
parentdb0763aaa495f1f6fe8bd6d07f859de647de761a
msg/async/net_handler: do not define variable unless it is used

on WIN32, `flags` is not used at all, hence GCC complains like

../src/msg/async/net_handler.cc: In member function 'int ceph::NetHandler::set_nonblock(int)':
../src/msg/async/net_handler.cc:67:7: warning: unused variable 'flags' [-Wunused-variable]
   67 |   int flags;
      |       ^~~~~

this change silences the warning.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/async/net_handler.cc