Skip to content

Commit 41a8c44

Browse files
authored
Fix a warning when compiled with gcc-14 (#245)
With gcc-14 using -Wall -Wextra I get a warning about adding brackets to a "a || b && c" statement to make clear && is evaluated first.
1 parent 1bb1479 commit 41a8c44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/xtensor-blas/xlinalg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ namespace xt
634634
{
635635
m_offset -= static_cast<std::ptrdiff_t>(m_idx[i]) * m_a.strides()[i];
636636
m_idx[i] = size_type(0);
637-
if (i == 0 || m_axis == 0 && i == 1)
637+
if (i == 0 || (m_axis == 0 && i == 1))
638638
{
639639
return false;
640640
}

0 commit comments

Comments
 (0)