[Genabel-commits] r1577 - pkg/VariABEL/src/ITERlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 30 10:14:35 CET 2014


Author: maksim
Date: 2014-01-30 10:14:35 +0100 (Thu, 30 Jan 2014)
New Revision: 1577

Modified:
   pkg/VariABEL/src/ITERlib/iterator.cpp
   pkg/VariABEL/src/ITERlib/iterator_functions.cpp
Log:
clang warnings fixes

Modified: pkg/VariABEL/src/ITERlib/iterator.cpp
===================================================================
--- pkg/VariABEL/src/ITERlib/iterator.cpp	2014-01-30 09:10:14 UTC (rev 1576)
+++ pkg/VariABEL/src/ITERlib/iterator.cpp	2014-01-30 09:14:35 UTC (rev 1577)
@@ -226,7 +226,7 @@
 		if (argList == NULL) {error_R("can not allocate RAM for argList\n");return R_NilValue;}
 		va_list ap;
 		va_start(ap, nrarg); // nrarg is last known parameter
-		for (unsigned register int i = 0; i < narg; i++) {
+		for (unsigned int i = 0; i < narg; i++) {
 			argList[i] = va_arg(ap, SEXP);
 		}
 		va_end(ap);

Modified: pkg/VariABEL/src/ITERlib/iterator_functions.cpp
===================================================================
--- pkg/VariABEL/src/ITERlib/iterator_functions.cpp	2014-01-30 09:10:14 UTC (rev 1576)
+++ pkg/VariABEL/src/ITERlib/iterator_functions.cpp	2014-01-30 09:14:35 UTC (rev 1577)
@@ -12,7 +12,7 @@
 	// Product function + wrapper
 	double prod(double *mydata, unsigned int size) {
 		double prodtotal = mydata[0];
-		for (register unsigned int i = 1; i < size; i++) {
+		for (unsigned int i = 1; i < size; i++) {
 			prodtotal *= mydata[i];
 		}
 		return prodtotal;
@@ -34,7 +34,7 @@
 		double sumtotal = 0.;
 		double zero = 0;
 		//Rprintf("%f\n", mydata[0]);
-		for (register unsigned int i = 0; i < size; i++) {
+		for (unsigned int i = 0; i < size; i++) {
 
 			if (!ISNAN(mydata[i])) {
 				sumtotal += mydata[i];
@@ -61,7 +61,7 @@
 	// Sum of powers function + wrapper
 	double sumpower(double *mydata, unsigned int size, int power) {
 		double sumpowertotal = 0.;
-		for (register unsigned int i = 0; i < size; i++) {
+		for (unsigned int i = 0; i < size; i++) {
 			sumpowertotal += pow(mydata[i], power);
 		}
 		return sumpowertotal;



More information about the Genabel-commits mailing list