From: Danny Al-Gaaf Date: Wed, 23 Sep 2015 11:35:52 +0000 (+0200) Subject: msg/simple/Pipe.cc: silence cppcheck warning about reassign before use X-Git-Tag: v10.0.4~86^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6fac5a950ae16e937c69bf58347e181d101153a3;p=ceph.git msg/simple/Pipe.cc: silence cppcheck warning about reassign before use Signed-off-by: Danny Al-Gaaf --- diff --git a/src/msg/simple/Pipe.cc b/src/msg/simple/Pipe.cc index ace77aa298f3..89c8b8f24cd2 100644 --- a/src/msg/simple/Pipe.cc +++ b/src/msg/simple/Pipe.cc @@ -1717,9 +1717,8 @@ void Pipe::writer() state_closed.set(1); pipe_lock.Unlock(); if (sd) { - int r = ::write(sd, &tag, 1); - // we can ignore r, actually; we don't care if this succeeds. - r++; r = 0; // placate gcc + // we can ignore return value, actually; we don't care if this succeeds. + if(::write(sd, &tag, 1)); } pipe_lock.Lock(); continue;