[Genabel-commits] r1378 - pkg/DatABEL/src/DAlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 11 17:34:27 CET 2013


Author: maksim
Date: 2013-11-11 17:34:26 +0100 (Mon, 11 Nov 2013)
New Revision: 1378

Modified:
   pkg/DatABEL/src/DAlib/AbstractMatrix_R.cpp
   pkg/DatABEL/src/DAlib/FilteredMatrix_R.cpp
Log:
Fixed warning: |comparison of unsigned expression < 0 is always false|. Commented the comparison. Hope I did not step on someone's toes by changing DatABEL code? If I do, tell me and I will return it back.

Modified: pkg/DatABEL/src/DAlib/AbstractMatrix_R.cpp
===================================================================
--- pkg/DatABEL/src/DAlib/AbstractMatrix_R.cpp	2013-11-11 09:44:44 UTC (rev 1377)
+++ pkg/DatABEL/src/DAlib/AbstractMatrix_R.cpp	2013-11-11 16:34:26 UTC (rev 1378)
@@ -286,10 +286,10 @@
 		unsigned long cachesizeMb = (unsigned long) INTEGER(cacheMb)[0];
 		bool readonly = LOGICAL(ReadOnly)[0];
 		string filename = CHAR(STRING_ELT(fname,0));
-		if (cachesizeMb<0) {
-			error_R("negative cache size\n");
-			return R_NilValue;
-		}
+//		if (cachesizeMb<0) {
+//			error_R("negative cache size\n");
+//			return R_NilValue;
+//		}
 
 		AbstractMatrix* p = NULL;
 
@@ -362,7 +362,8 @@
 			return R_NilValue;
 		}
 
-		if (nvariable <0 || nvariable >= nvars) {
+		if (nvariable >= nvars) {
+//		if (nvariable <0 || nvariable >= nvars) {
 			error_R("nvar (%lu) out of range!\n",nvariable);
 			return R_NilValue;
 		}

Modified: pkg/DatABEL/src/DAlib/FilteredMatrix_R.cpp
===================================================================
--- pkg/DatABEL/src/DAlib/FilteredMatrix_R.cpp	2013-11-11 09:44:44 UTC (rev 1377)
+++ pkg/DatABEL/src/DAlib/FilteredMatrix_R.cpp	2013-11-11 16:34:26 UTC (rev 1378)
@@ -107,10 +107,10 @@
    		bool readonly = LOGICAL(ReadOnly)[0];
    		string filename = CHAR(STRING_ELT(fname,0));
 
-   		if (cachesizeMb<0) {
-   			error_R("negative cache size\n");
-   			return R_NilValue;
-   		}
+//   		if (cachesizeMb<0) {
+//   			error_R("negative cache size\n");
+//   			return R_NilValue;
+//   		}
 
    		FilteredMatrix* fm = NULL;
 



More information about the Genabel-commits mailing list