Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some compiler warnings #624

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/nmatrix/math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ namespace nm {

//we can't do det_exact on byte, because it will want to return a byte (unsigned), but determinants can be negative, even if all elements of the matrix are positive
template <>
void det_exact_from_dense<uint8_t>(const int M, const void* A_elements, const int lda, void* result_arg) {
[[ noreturn ]] void det_exact_from_dense<uint8_t>(const int M, const void* A_elements, const int lda, void* result_arg) {
rb_raise(nm_eDataTypeError, "cannot call det_exact on unsigned type");
}
/*
Expand Down Expand Up @@ -464,7 +464,7 @@ namespace nm {
delete[] u;
}

void raise_not_invertible_error() {
[[ noreturn ]] void raise_not_invertible_error() {
rb_raise(nm_eNotInvertibleError,
"matrix must have non-zero determinant to be invertible (not getting this error does not mean matrix is invertible if you're dealing with floating points)");
}
Expand Down
2 changes: 1 addition & 1 deletion ext/nmatrix/ruby_nmatrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ static VALUE nm_init_new_version(int argc, VALUE* argv, VALUE self) {
// Get the shape.
size_t dim;
size_t* shape = interpret_shape(shape_ary, &dim);
void* init;
void* init = NULL;
void* v = NULL;
size_t v_size = 0;

Expand Down