Skip to content

Commit 7134f2f

Browse files
committed
Fix building error for -Werror=unused-value
Compiling trantor in Buildroot raises the following error: In file included from output/host/include/openssl/ssl.h:30, from output/build/host-drogon-v1.9.11/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc:6: build/host-drogon-v1.9.11/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc: In member function ‘ssize_t OpenSSLProvider::sendTLSData()’: output/host/include/openssl/bio.h:629:34: error: value computed is not used [-Werror=unused-value] 629 | # define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ output/build/host-drogon-v1.9.11/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc:777:9: note: in expansion of macro ‘BIO_reset’ 777 | BIO_reset(wbio_); | ^~~~~~~~~ Signed-off-by: Dario Binacchi <[email protected]>
1 parent 09203dc commit 7134f2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trantor/net/inner/tlsprovider/OpenSSLProvider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ struct OpenSSLProvider : public TLSProvider, public NonCopyable
774774
{
775775
appendToWriteBuffer((char *)data + n, len - n);
776776
}
777-
BIO_reset(wbio_);
777+
(void)BIO_reset(wbio_);
778778
if (n < 0)
779779
return -1;
780780
return len;

0 commit comments

Comments
 (0)