You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/08/23 12:45:51 UTC

[avro] branch avro-3616-c++-fix-compilation-warnings created (now 91f7a1dc1)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a change to branch avro-3616-c++-fix-compilation-warnings
in repository https://gitbox.apache.org/repos/asf/avro.git


      at 91f7a1dc1 AVRO-3616: [C++]: Fix compilation warnings

This branch includes the following new commits:

     new 262c70307 AVRO-3616: [C++]: Fix compilation warnings
     new 91f7a1dc1 AVRO-3616: [C++]: Fix compilation warnings

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[avro] 01/02: AVRO-3616: [C++]: Fix compilation warnings

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch avro-3616-c++-fix-compilation-warnings
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 262c703079c8f88b72fedfbaf690a87aa0002267
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Aug 23 14:54:24 2022 +0300

    AVRO-3616: [C++]: Fix compilation warnings
    
    Replace <boost/test/included/unit_test_framework.hpp> include with <boost/test/included/unit_test.hpp>
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 lang/c++/test/AvrogencppTestReservedWords.cc | 2 +-
 lang/c++/test/AvrogencppTests.cc             | 2 +-
 lang/c++/test/CodecTests.cc                  | 2 +-
 lang/c++/test/CompilerTests.cc               | 2 +-
 lang/c++/test/DataFileTests.cc               | 2 +-
 lang/c++/test/JsonTests.cc                   | 2 +-
 lang/c++/test/LargeSchemaTests.cc            | 2 +-
 lang/c++/test/SchemaTests.cc                 | 2 +-
 lang/c++/test/SpecificTests.cc               | 2 +-
 lang/c++/test/StreamTests.cc                 | 2 +-
 lang/c++/test/buffertest.cc                  | 2 +-
 lang/c++/test/testgentest.cc                 | 2 +-
 lang/c++/test/unittest.cc                    | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lang/c++/test/AvrogencppTestReservedWords.cc b/lang/c++/test/AvrogencppTestReservedWords.cc
index 7d305fb44..2bee4ab25 100644
--- a/lang/c++/test/AvrogencppTestReservedWords.cc
+++ b/lang/c++/test/AvrogencppTestReservedWords.cc
@@ -19,7 +19,7 @@
 
 #include "Compiler.hh"
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 
 #ifdef min
 #undef min
diff --git a/lang/c++/test/AvrogencppTests.cc b/lang/c++/test/AvrogencppTests.cc
index 2130f818b..144a500a6 100644
--- a/lang/c++/test/AvrogencppTests.cc
+++ b/lang/c++/test/AvrogencppTests.cc
@@ -23,7 +23,7 @@
 #include "union_array_union.hh"
 #include "union_map_union.hh"
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 
 #ifdef min
 #undef min
diff --git a/lang/c++/test/CodecTests.cc b/lang/c++/test/CodecTests.cc
index 7d1141602..27779bb03 100644
--- a/lang/c++/test/CodecTests.cc
+++ b/lang/c++/test/CodecTests.cc
@@ -34,7 +34,7 @@
 
 #include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/random/mersenne_twister.hpp>
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/parameterized_test.hpp>
 #include <boost/test/unit_test.hpp>
 
diff --git a/lang/c++/test/CompilerTests.cc b/lang/c++/test/CompilerTests.cc
index e3d4426a3..6fa5344ac 100644
--- a/lang/c++/test/CompilerTests.cc
+++ b/lang/c++/test/CompilerTests.cc
@@ -18,7 +18,7 @@
 
 #include <sstream>
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include "Compiler.hh"
diff --git a/lang/c++/test/DataFileTests.cc b/lang/c++/test/DataFileTests.cc
index fec7f316a..a29a6f9c2 100644
--- a/lang/c++/test/DataFileTests.cc
+++ b/lang/c++/test/DataFileTests.cc
@@ -20,7 +20,7 @@
 #include <boost/random/mersenne_twister.hpp>
 #include <boost/random/uniform_int_distribution.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include <chrono>
diff --git a/lang/c++/test/JsonTests.cc b/lang/c++/test/JsonTests.cc
index 3832e6913..da9722f30 100644
--- a/lang/c++/test/JsonTests.cc
+++ b/lang/c++/test/JsonTests.cc
@@ -18,7 +18,7 @@
 
 #include <limits>
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/parameterized_test.hpp>
 #include <boost/test/unit_test.hpp>
 
diff --git a/lang/c++/test/LargeSchemaTests.cc b/lang/c++/test/LargeSchemaTests.cc
index a12974c0f..d99e70988 100644
--- a/lang/c++/test/LargeSchemaTests.cc
+++ b/lang/c++/test/LargeSchemaTests.cc
@@ -21,7 +21,7 @@
 #include "ValidSchema.hh"
 #include <fstream>
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/parameterized_test.hpp>
 
 void testLargeSchema() {
diff --git a/lang/c++/test/SchemaTests.cc b/lang/c++/test/SchemaTests.cc
index b1260f567..d73b759cf 100755
--- a/lang/c++/test/SchemaTests.cc
+++ b/lang/c++/test/SchemaTests.cc
@@ -20,7 +20,7 @@
 #include "GenericDatum.hh"
 #include "ValidSchema.hh"
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/parameterized_test.hpp>
 #include <boost/test/unit_test.hpp>
 
diff --git a/lang/c++/test/SpecificTests.cc b/lang/c++/test/SpecificTests.cc
index e027f9518..72f2897e4 100644
--- a/lang/c++/test/SpecificTests.cc
+++ b/lang/c++/test/SpecificTests.cc
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include "Specific.hh"
diff --git a/lang/c++/test/StreamTests.cc b/lang/c++/test/StreamTests.cc
index 262e0600a..7eae5e12a 100644
--- a/lang/c++/test/StreamTests.cc
+++ b/lang/c++/test/StreamTests.cc
@@ -19,7 +19,7 @@
 #include "Exception.hh"
 #include "Stream.hh"
 #include "boost/filesystem.hpp"
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <boost/test/parameterized_test.hpp>
 
 namespace avro {
diff --git a/lang/c++/test/buffertest.cc b/lang/c++/test/buffertest.cc
index 188102859..904f8adbd 100644
--- a/lang/c++/test/buffertest.cc
+++ b/lang/c++/test/buffertest.cc
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 
 #include <boost/bind.hpp>
 
diff --git a/lang/c++/test/testgentest.cc b/lang/c++/test/testgentest.cc
index 3d86329ce..c204dd996 100644
--- a/lang/c++/test/testgentest.cc
+++ b/lang/c++/test/testgentest.cc
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <fstream>
 #include <sstream>
 #include <stdlib.h>
diff --git a/lang/c++/test/unittest.cc b/lang/c++/test/unittest.cc
index 3ed931068..73b92f1f7 100644
--- a/lang/c++/test/unittest.cc
+++ b/lang/c++/test/unittest.cc
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
 #include <iostream>
 #include <memory>
 #include <string>


[avro] 02/02: AVRO-3616: [C++]: Fix compilation warnings

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch avro-3616-c++-fix-compilation-warnings
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 91f7a1dc14c7f881d76cbe2e7d39bcda1109575b
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Aug 23 15:43:16 2022 +0300

    AVRO-3616: [C++]: Fix compilation warnings
    
    Fix the order of constructor parameters
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 lang/c++/impl/DataFile.cc    | 10 +++++-----
 lang/c++/impl/Resolver.cc    |  2 +-
 lang/c++/impl/ValidSchema.cc |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lang/c++/impl/DataFile.cc b/lang/c++/impl/DataFile.cc
index f215f95b1..e58bc4f99 100644
--- a/lang/c++/impl/DataFile.cc
+++ b/lang/c++/impl/DataFile.cc
@@ -259,14 +259,14 @@ void DataFileWriterBase::setMetadata(const string &key, const string &value) {
     metadata_[key] = v;
 }
 
-DataFileReaderBase::DataFileReaderBase(const char *filename) : filename_(filename), codec_(NULL_CODEC), stream_(fileSeekableInputStream(filename)),
-                                                               decoder_(binaryDecoder()), objectCount_(0), eof_(false), blockStart_(-1),
-                                                               blockEnd_(-1) {
+DataFileReaderBase::DataFileReaderBase(const char *filename) : filename_(filename), stream_(fileSeekableInputStream(filename)),
+                                                               decoder_(binaryDecoder()), objectCount_(0), eof_(false),
+                                                               codec_(NULL_CODEC), blockStart_(-1), blockEnd_(-1) {
     readHeader();
 }
 
-DataFileReaderBase::DataFileReaderBase(std::unique_ptr<InputStream> inputStream) : codec_(NULL_CODEC), stream_(std::move(inputStream)),
-                                                                                   decoder_(binaryDecoder()), objectCount_(0), eof_(false) {
+DataFileReaderBase::DataFileReaderBase(std::unique_ptr<InputStream> inputStream) : stream_(std::move(inputStream)),
+                                                                                   decoder_(binaryDecoder()), objectCount_(0), eof_(false), codec_(NULL_CODEC) {
     readHeader();
 }
 
diff --git a/lang/c++/impl/Resolver.cc b/lang/c++/impl/Resolver.cc
index 919345e8a..d19a04ad7 100644
--- a/lang/c++/impl/Resolver.cc
+++ b/lang/c++/impl/Resolver.cc
@@ -710,8 +710,8 @@ NonUnionToUnionParser::NonUnionToUnionParser(ResolverFactory &factory,
                                              const NodePtr &writer,
                                              const NodePtr &reader,
                                              const CompoundLayout &offsets) : Resolver(),
-                                                                              offset_(offsets.offset()),
                                                                               choice_(0),
+                                                                              offset_(offsets.offset()),
                                                                               choiceOffset_(offsets.at(0).offset()),
                                                                               setFuncOffset_(offsets.at(1).offset()) {
 #ifndef NDEBUG
diff --git a/lang/c++/impl/ValidSchema.cc b/lang/c++/impl/ValidSchema.cc
index 63a3bbee9..ca2d9ffe0 100644
--- a/lang/c++/impl/ValidSchema.cc
+++ b/lang/c++/impl/ValidSchema.cc
@@ -70,7 +70,7 @@ static bool validate(const NodePtr &node, SymbolMap &symbolMap) {
 
     node->lock();
     auto leaves = node->leaves();
-    for (auto i = 0; i < leaves; ++i) {
+    for (long unsigned int i = 0; i < leaves; ++i) {
         const NodePtr &leaf(node->leafAt(i));
 
         if (!validate(leaf, symbolMap)) {