[
https://issues.apache.org/jira/browse/HADOOP-12114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603506#comment-14603506
]
Colin Patrick McCabe commented on HADOOP-12114:
-----------------------------------------------
It's not just Solaris. I get a compiler warning with {{gcc (SUSE Linux) 4.8.1
20130909 \[gcc-4_8-branch revision 202388\]}}
{code}
[ 14%] Building CXX object
CMakeFiles/hadooppipes.dir/main/native/pipes/impl/HadoopPipes.cc.o
/home/cmccabe/hadoop2/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:
In member function ‘std::string
HadoopPipes::BinaryProtocol::createDigest(std::string&, std::string&)’:
/home/cmccabe/hadoop2/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:440:21:
warning: value computed is not used [-Wunused-value]
BIO_flush(b64);
^
{code}
However... I don't think ignoring this value is correct. From the
documentation of {{BIO_flush}}:
>From https://www.openssl.org/docs/crypto/BIO_ctrl.html :
bq. BIO_flush(), because it can write data may return 0 or -1 indicating that
the call should be retried later in a similar manner to BIO_write(). The
BIO_should_retry() call should be used and appropriate action taken is the call
fails.
In keeping with the other logging in hadoop-pipes, how about a {{std::cerr <<
"BIO_Flush failed"}} or something? And then return the empty string? It seems
like the flush failure should not happen often (if at all) since the stream is
in memory, but good error handling is still important.
> Make hadoop-tools/hadoop-pipes Native code -Wall-clean
> ------------------------------------------------------
>
> Key: HADOOP-12114
> URL: https://issues.apache.org/jira/browse/HADOOP-12114
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: native
> Affects Versions: 2.7.0
> Reporter: Alan Burlison
> Assignee: Alan Burlison
> Attachments: HADOOP-12114.001.patch
>
>
> As we specify -Wall as a default compilation flag, it would be helpful if the
> Native code was -Wall-clean
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)