Return a value so Ruby 1.9.3 doesnt blow up #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When installing ruby-svd on Ruby 1.9.3, it will not install:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
creating Makefile
make
compiling svd.c
In file included from svd.c:3:
In file included from ./svd.h:6:
./nrutil.h:106:19: warning: passing 'const char [31]' to parameter of type 'char ' discards qualifiers
if (!v) nrerror("allocation failure in vector()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:116:19: warning: passing 'const char [32]' to parameter of type 'char *' discards qualifiers
if (!v) nrerror("allocation failure in ivector()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:127:19: warning: passing 'const char [32]' to parameter of type 'char *' discards qualifiers
if (!v) nrerror("allocation failure in cvector()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:137:19: warning: passing 'const char [32]' to parameter of type 'char *' discards qualifiers
if (!v) nrerror("allocation failure in lvector()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:147:19: warning: passing 'const char [32]' to parameter of type 'char *' discards qualifiers
if (!v) nrerror("allocation failure in dvector()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:159:19: warning: passing 'const char [33]' to parameter of type 'char *' discards qualifiers
if (!m) nrerror("allocation failure 1 in matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:165:24: warning: passing 'const char [33]' to parameter of type 'char *' discards qualifiers
if (!m[nrl]) nrerror("allocation failure 2 in matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:183:19: warning: passing 'const char [33]' to parameter of type 'char *' discards qualifiers
if (!m) nrerror("allocation failure 1 in matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:189:24: warning: passing 'const char [33]' to parameter of type 'char *' discards qualifiers
if (!m[nrl]) nrerror("allocation failure 2 in matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:207:19: warning: passing 'const char [33]' to parameter of type 'char *' discards qualifiers
if (!m) nrerror("allocation failure 1 in matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:213:24: warning: passing 'const char [33]' to parameter of type 'char *' discards qualifiers
if (!m[nrl]) nrerror("allocation failure 2 in matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:234:19: warning: passing 'const char [34]' to parameter of type 'char *' discards qualifiers
if (!m) nrerror("allocation failure in submatrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:256:19: warning: passing 'const char [39]' to parameter of type 'char *' discards qualifiers
if (!m) nrerror("allocation failure in convert_matrix()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:276:19: warning: passing 'const char [35]' to parameter of type 'char *' discards qualifiers
if (!t) nrerror("allocation failure 1 in f3tensor()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:283:24: warning: passing 'const char [35]' to parameter of type 'char *' discards qualifiers
if (!t[nrl]) nrerror("allocation failure 2 in f3tensor()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
./nrutil.h:290:29: warning: passing 'const char [35]' to parameter of type 'char *' discards qualifiers
if (!t[nrl][ncl]) nrerror("allocation failure 3 in f3tensor()");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
In file included from svd.c:3:
./svd.h:142:27: warning: passing 'const char [39]' to parameter of type 'char *' discards qualifiers
if (its == 30) nrerror("no convergence in 30 svdcmp iterations");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./nrutil.h:91:19: note: passing argument to parameter 'error_text' here
void nrerror(char error_text[])
^
svd.c:24:3: error: non-void function 'decompose' should return a value [-Wreturn-type]
return;
^
17 warnings and 1 error generated.
make: ** [svd.o] Error 1
Gem files will remain installed in /Users/ryan/.rvm/gems/ruby-1.9.3-p125@4seg/gems/ruby-svd-0.5.1 for inspection.
Results logged to /Users/ryan/.rvm/gems/ruby-1.9.3-p125@4seg/gems/ruby-svd-0.5.1/ext/gem_make.out