]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/simple: fix warning
authorSage Weil <sage@redhat.com>
Tue, 2 Feb 2016 22:41:08 +0000 (17:41 -0500)
committerSage Weil <sage@redhat.com>
Wed, 3 Feb 2016 20:16:25 +0000 (15:16 -0500)
msg/simple/Pipe.cc: In member function 'void Pipe::writer()':
msg/simple/Pipe.cc:1721:26: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
  if(::write(sd, &tag, 1));
                          ^

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/simple/Pipe.cc

index 89c8b8f24cd2ef669b39a03b522f040a16a6e7a6..7fb166f1f5bd4f4f3d9baa88088ac2c11c93704d 100644 (file)
@@ -1718,7 +1718,8 @@ void Pipe::writer()
       pipe_lock.Unlock();
       if (sd) {
        // we can ignore return value, actually; we don't care if this succeeds.
-       if(::write(sd, &tag, 1));
+       int r = ::write(sd, &tag, 1);
+       (void)r;
       }
       pipe_lock.Lock();
       continue;