Skip to content

Commit d67ba32

Browse files
committed
Turn on warnings during compilations, fix various issues.
1 parent 09af177 commit d67ba32

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

include/tatami_python/sparse_matrix.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ void parse_Sparse2darray(const pybind11::object& matrix, Value_* const vbuffer,
9393
auto svt = raw_svt.template cast<pybind11::list>();
9494

9595
const auto shape = get_shape<Index_>(matrix);
96-
const auto NR = shape.first;
9796
const auto NC = shape.second;
9897

9998
for (I<decltype(NC)> c = 0; c < NC; ++c) {

tests/lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ target_include_directories(tatami_python_test PRIVATE "../../build/_deps/tatami_
2020
target_include_directories(tatami_python_test PRIVATE "../../include")
2121

2222
target_compile_definitions(tatami_python_test PRIVATE TEST_CUSTOM_PARALLEL=1)
23+
target_compile_options(tatami_python_test PRIVATE -Wall -Wpedantic -Wextra -Werror)
2324

2425
set_property(TARGET tatami_python_test PROPERTY CXX_STANDARD 17)
2526

tests/lib/src/bindings.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ pybind11::list dense_block(
152152
const std::int32_t len
153153
) {
154154
auto ptr = reinterpret_cast<TestMatrix*>(ptr0);
155-
const auto secondary = (!row ? ptr->nrow() : ptr->ncol());
156155
auto ext = create_extractor<false, oracle_>(*ptr, row, idx, first, len, true, true);
157156
const auto iptr = static_cast<const std::int32_t*>(idx.request().ptr);
158157
const std::size_t num = idx.size();
@@ -219,7 +218,6 @@ pybind11::list dense_indexed(
219218
const pybind11::array_t<std::int32_t>& subset
220219
) {
221220
auto ptr = reinterpret_cast<TestMatrix*>(ptr0);
222-
const auto secondary = (!row ? ptr->nrow() : ptr->ncol());
223221
auto ext = create_extractor<false, oracle_>(*ptr, row, idx, subset, true, true);
224222
const auto iptr = static_cast<const std::int32_t*>(idx.request().ptr);
225223
const std::size_t num = idx.size();
@@ -477,7 +475,7 @@ template<bool oracle_>
477475
pybind11::array_t<double> dense_sums(
478476
const std::uintptr_t ptr0,
479477
const bool row,
480-
const std::int32_t num_threads
478+
[[maybe_unused]] const std::int32_t num_threads
481479
) {
482480
auto ptr = reinterpret_cast<TestMatrix*>(reinterpret_cast<void*>(ptr0));
483481
const auto primary = (row ? ptr->nrow() : ptr->ncol());
@@ -564,7 +562,7 @@ template<bool oracle_>
564562
pybind11::array_t<double> sparse_sums(
565563
const std::uintptr_t ptr0,
566564
const bool row,
567-
const std::int32_t num_threads
565+
[[maybe_unused]] const std::int32_t num_threads
568566
) {
569567
auto ptr = reinterpret_cast<TestMatrix*>(reinterpret_cast<void*>(ptr0));
570568
const auto primary = (row ? ptr->nrow() : ptr->ncol());

0 commit comments

Comments
 (0)