You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2022/08/23 12:41:00 UTC
[jira] [Updated] (AVRO-3616) [C++]: Fix compilation warnings
[ https://issues.apache.org/jira/browse/AVRO-3616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov updated AVRO-3616:
--------------------------------------------
Description:
Building the C++ SDK prints two types of warnings:
1. Usage of deprecated Boost test related import
{code:java}
In file included from /usr/include/boost/config/header_deprecated.hpp:18,
from /usr/include/boost/test/included/unit_test_framework.hpp:12,
from /home/runner/work/avro/avro/lang/c++/test/SpecificTests.cc:19:
/usr/include/boost/test/included/unit_test_framework.hpp:13:1: note: #pragma message: This header is deprecated. Use This header is deprecated. Please use <boost/test/included/unit_test.hpp> instead. instead.
13 | BOOST_HEADER_DEPRECATED( "This header is deprecated. Please use <boost/test/included/unit_test.hpp> instead." )
| ^~~~~~~~~~~~~~~~~~~~~~~{code}
2. Wrong order of constructor arguments
{code:java}
In file included from /home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:19:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh: In constructor ‘avro::DataFileReaderBase::DataFileReaderBase(const char*)’:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:200:11: warning: ‘avro::DataFileReaderBase::codec_’ will be initialized after [-Wreorder] 200 | Codec codec_; | ^~~~~~/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:197:22: warning: ‘const DecoderPtr avro::DataFileReaderBase::decoder_’ [-Wreorder] 197 | const DecoderPtr decoder_; | ^~~~~~~~/home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:262:1: warning: when initialized here [-Wreorder] 262 | DataFileReaderBase::DataFileReaderBase(const char *filename) : filename_(filename), stream_(fileSeekableInputStream(filename)), codec_(NULL_CODEC), | ^~~~~~~~~~~~~~~~~~In file included from /home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:19:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh: In constructor ‘avro::DataFileReaderBase::DataFileReaderBase(std::unique_ptr<avro::InputStream>)’:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:200:11: warning: ‘avro::DataFileReaderBase::codec_’ will be initialized after [-Wreorder] 200 | Codec codec_; | ^~~~~~/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:197:22: warning: ‘const DecoderPtr avro::DataFileReaderBase::decoder_’ [-Wreorder] 197 | const DecoderPtr decoder_; | ^~~~~~~~/home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:268:1: warning: when initialized here [-Wreorder] 268 | DataFileReaderBase::DataFileReaderBase(std::unique_ptr<InputStream> inputStream) : stream_(std::move(inputStream)), codec_(NULL_CODEC), {code}
was:
Building the C++ SDK prints two types of warnings:
1. Usage of deprecated Boost test related import
{code:java}
In file included from /usr/include/boost/config/header_deprecated.hpp:18,
from /usr/include/boost/test/included/unit_test_framework.hpp:12,
from /home/runner/work/avro/avro/lang/c++/test/SpecificTests.cc:19:
/usr/include/boost/test/included/unit_test_framework.hpp:13:1: note: #pragma message: This header is deprecated. Use This header is deprecated. Please use <boost/test/included/unit_test.hpp> instead. instead.
13 | BOOST_HEADER_DEPRECATED( "This header is deprecated. Please use <boost/test/included/unit_test.hpp> instead." )
| ^~~~~~~~~~~~~~~~~~~~~~~{code}
2. Wrong order of constructor arguments
{code:java}
In file included from /home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:19:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh: In constructor ‘avro::DataFileReaderBase::DataFileReaderBase(const char*)’:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:200:11: warning: ‘avro::DataFileReaderBase::codec_’ will be initialized after [-Wreorder] 200 | Codec codec_; | ^~~~~~/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:197:22: warning: ‘const DecoderPtr avro::DataFileReaderBase::decoder_’ [-Wreorder] 197 | const DecoderPtr decoder_; | ^~~~~~~~/home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:262:1: warning: when initialized here [-Wreorder] 262 | DataFileReaderBase::DataFileReaderBase(const char *filename) : filename_(filename), stream_(fileSeekableInputStream(filename)), codec_(NULL_CODEC), | ^~~~~~~~~~~~~~~~~~In file included from /home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:19:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh: In constructor ‘avro::DataFileReaderBase::DataFileReaderBase(std::unique_ptr<avro::InputStream>)’:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:200:11: warning: ‘avro::DataFileReaderBase::codec_’ will be initialized after [-Wreorder] 200 | Codec codec_; | ^~~~~~/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:197:22: warning: ‘const DecoderPtr avro::DataFileReaderBase::decoder_’ [-Wreorder] 197 | const DecoderPtr decoder_; | ^~~~~~~~/home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:268:1: warning: when initialized here [-Wreorder] 268 | DataFileReaderBase::DataFileReaderBase(std::unique_ptr<InputStream> inputStream) : stream_(std::move(inputStream)), codec_(NULL_CODEC), {code}
> [C++]: Fix compilation warnings
> -------------------------------
>
> Key: AVRO-3616
> URL: https://issues.apache.org/jira/browse/AVRO-3616
> Project: Apache Avro
> Issue Type: Improvement
> Components: c++
> Affects Versions: 1.11.1
> Reporter: Martin Tzvetanov Grigorov
> Assignee: Martin Tzvetanov Grigorov
> Priority: Minor
>
> Building the C++ SDK prints two types of warnings:
>
> 1. Usage of deprecated Boost test related import
> {code:java}
> In file included from /usr/include/boost/config/header_deprecated.hpp:18,
> from /usr/include/boost/test/included/unit_test_framework.hpp:12,
> from /home/runner/work/avro/avro/lang/c++/test/SpecificTests.cc:19:
>
> /usr/include/boost/test/included/unit_test_framework.hpp:13:1: note: #pragma message: This header is deprecated. Use This header is deprecated. Please use <boost/test/included/unit_test.hpp> instead. instead.
> 13 | BOOST_HEADER_DEPRECATED( "This header is deprecated. Please use <boost/test/included/unit_test.hpp> instead." )
> | ^~~~~~~~~~~~~~~~~~~~~~~{code}
> 2. Wrong order of constructor arguments
> {code:java}
> In file included from /home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:19:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh: In constructor ‘avro::DataFileReaderBase::DataFileReaderBase(const char*)’:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:200:11: warning: ‘avro::DataFileReaderBase::codec_’ will be initialized after [-Wreorder] 200 | Codec codec_; | ^~~~~~/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:197:22: warning: ‘const DecoderPtr avro::DataFileReaderBase::decoder_’ [-Wreorder] 197 | const DecoderPtr decoder_; | ^~~~~~~~/home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:262:1: warning: when initialized here [-Wreorder] 262 | DataFileReaderBase::DataFileReaderBase(const char *filename) : filename_(filename), stream_(fileSeekableInputStream(filename)), codec_(NULL_CODEC), | ^~~~~~~~~~~~~~~~~~In file included from /home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:19:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh: In constructor ‘avro::DataFileReaderBase::DataFileReaderBase(std::unique_ptr<avro::InputStream>)’:/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:200:11: warning: ‘avro::DataFileReaderBase::codec_’ will be initialized after [-Wreorder] 200 | Codec codec_; | ^~~~~~/home/martin/git/apache/avro/lang/c++/api/DataFile.hh:197:22: warning: ‘const DecoderPtr avro::DataFileReaderBase::decoder_’ [-Wreorder] 197 | const DecoderPtr decoder_; | ^~~~~~~~/home/martin/git/apache/avro/lang/c++/impl/DataFile.cc:268:1: warning: when initialized here [-Wreorder] 268 | DataFileReaderBase::DataFileReaderBase(std::unique_ptr<InputStream> inputStream) : stream_(std::move(inputStream)), codec_(NULL_CODEC), {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)