Skip to content

Commit

Permalink
Deactivate gcc warnings for 2 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-PLACET committed Jul 11, 2024
1 parent 79ffccb commit d8b7654
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
3 changes: 1 addition & 2 deletions include/sparrow/array_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "sparrow/contracts.hpp"
#include "sparrow/data_type.hpp"
#include "sparrow/dynamic_bitset.hpp"
// #include "sparrow/memory.hpp"
#include "sparrow/details/3rdparty/value_ptr_lite.hpp"

namespace sparrow
Expand Down Expand Up @@ -71,7 +70,7 @@ namespace sparrow
array_data(const array_data&) = default;
array_data(array_data&&) = default;
array_data& operator=(const array_data&) = default;
array_data& operator=(array_data&&) = default;
array_data& operator=(array_data&&) noexcept = default;

data_descriptor m_type;
length_type m_length = 0;
Expand Down
20 changes: 18 additions & 2 deletions include/sparrow/array_data_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "sparrow/reference_wrapper_utils.hpp"
#include "sparrow/variable_size_binary_layout.hpp"


namespace sparrow
{
/*
Expand All @@ -58,6 +57,11 @@ namespace sparrow
};
}

#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

/**
* \brief Creates an array_data object for a fixed-size layout.
*
Expand All @@ -73,6 +77,10 @@ namespace sparrow
return {data_descriptor(arrow_type_id<U>()), 0, 0, {}, {{}}, {}, nullptr};
}

#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif

/**
* Checks if all elements in the input range have the same size.
*
Expand Down Expand Up @@ -323,6 +331,11 @@ namespace sparrow
);
}

#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

/**
* Creates an empty array_data object for dictionary encoded layout.
*
Expand All @@ -332,7 +345,7 @@ namespace sparrow
template <typename T>
array_data make_array_data_for_dictionary_encoded_layout()
{
return {
return array_data{
data_descriptor(arrow_type_id<std::uint64_t>()),
0,
0,
Expand All @@ -342,6 +355,9 @@ namespace sparrow
nonstd::value_ptr<array_data>(make_array_data_for_variable_size_binary_layout<T>())
};
}
#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif

/**
* Creates an array_data object for dictionary encoded layout.
Expand Down

0 comments on commit d8b7654

Please sign in to comment.