diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-24 17:18:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-25 09:26:14 +0100 |
commit | b686bab2e39216f5b1df9f7fb77099fec6d2f611 (patch) | |
tree | 7e0f6b62b24cf78fa54dc8988acd6fcecc28556a | |
parent | d785059238abf7ee28aec1b6555dcd38c5b6c61f (diff) |
WaE: return value of fwrite unchecked
Change-Id: I83ecc3ef45eb411741db4b4ff20982bff1709d99
-rw-r--r-- | extensions/source/plugin/unx/npnapi.cxx | 3 | ||||
-rw-r--r-- | extensions/source/plugin/unx/npwrap.cxx | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index 3e41dd56ae13..8a9ce451d5e8 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -871,7 +871,8 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_Shutdown: { - write( wakeup_fd[1], "xxxx", 4 ); + bool bSuccess = (4 == write(wakeup_fd[1], "xxxx", 4)); + SAL_WARN_IF( !bSuccess, "extensions", "short write"); } break; default: diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx index f6d00a240225..514c92abb08b 100644 --- a/extensions/source/plugin/unx/npwrap.cxx +++ b/extensions/source/plugin/unx/npwrap.cxx @@ -65,7 +65,8 @@ static long GlobalConnectionLostHdl( void* /*pInst*/, void* /*pArg*/ ) { medDebug( 1, "pluginapp exiting due to connection lost\n" ); - write( wakeup_fd[1], "xxxx", 4 ); + bool bSuccess = (4 == write(wakeup_fd[1], "xxxx", 4 )); + SAL_WARN_IF( !bSuccess, "extensions", "short write"); return 0; } @@ -111,7 +112,8 @@ extern "C" IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) { medDebug( 1, "new message handler\n" ); - write( wakeup_fd[1], "cccc", 4 ); + bool bSuccess = (4 == write(wakeup_fd[1], "cccc", 4)); + SAL_WARN_IF( !bSuccess, "extensions", "short write"); return 0; } |