Bug#987833: r-cran-openmx: FTBFS on mips due to a variable called 'mips'

2021-05-05 Thread Joshua N Pritikin
On Wed, May 05, 2021 at 09:38:03AM +0200, Andreas Tille wrote:
> Control: tags -1 upstream
> Control: forwarded -1 Joshua Pritikin 
> 
> Hi Joshua,
> 
> here is another instance of the mips variable.  It would be great
> if you could fix this in your next release.

Yeah, will do



Bug#987833: r-cran-openmx: FTBFS on mips due to a variable called 'mips'

2021-05-05 Thread Andreas Tille
Control: tags -1 upstream
Control: forwarded -1 Joshua Pritikin 

Hi Joshua,

here is another instance of the mips variable.  It would be great
if you could fix this in your next release.

Kind regards

Andreas.


On Fri, Apr 30, 2021 at 10:30:07PM +0800, Yangfl wrote:
> Source: r-cran-openmx
> Tags: patch
> Severity: minor
> 
> Hi,
> 
> r-cran-openmx FTBFS on mips (after fixing #987755), since a variable
> is called 'mips' and on mips 'mips' is expanded to '1'. Please
> consider applying this patch, adding a suffix to the variable 'mips'.

> diff --git a/src/ba81quad.cpp b/src/ba81quad.cpp
> index 3df6ee0..6ebca7d 100644
> --- a/src/ba81quad.cpp
> +++ b/src/ba81quad.cpp
> @@ -212,7 +212,7 @@ void ifaGroup::import(const List )
>  
>   paramRows = -1;
>   int pmatCols=-1;
> - int mips = 1;
> + int mips_ = 1;
>   int dataRows = 0;
>   NumericVector Rmean;
>   NumericMatrix Rcov;
> @@ -272,7 +272,7 @@ void ifaGroup::import(const List )
>   } else if (strEQ(key, "qpoints")) {
>   qpoints = as(slotValue);
>   } else if (strEQ(key, "minItemsPerScore")) {
> - mips = as(slotValue);
> + mips_ = as(slotValue);
>   } else {
>   // ignore
>   }
> @@ -313,7 +313,7 @@ void ifaGroup::import(const List )
>  
>   setLatentDistribution(mean, cov);
>  
> - setMinItemsPerScore(mips);
> + setMinItemsPerScore(mips_);
>  
>   if (numItems() != pmatCols) {
>   mxThrow("item matrix implies %d items but spec is length %d",
> @@ -422,13 +422,13 @@ void ba81NormalQuad::layer::setupOutcomes(ifaGroup )
>  void ba81NormalQuad::setupOutcomes(class ifaGroup )
>  { layers[0].setupOutcomes(ig); }
>  
> -void ifaGroup::setMinItemsPerScore(int mips)
> +void ifaGroup::setMinItemsPerScore(int mips_)
>  {
>   if (numItems() && mips > numItems()) {
>   mxThrow("minItemsPerScore (=%d) cannot be larger than the 
> number of items (=%d)",
> -  mips, numItems());
> +  mips_, numItems());
>   }
> - minItemsPerScore = mips;
> + minItemsPerScore = mips_;
>  }
>  
>  void ifaGroup::buildRowMult()
> diff --git a/src/ba81quad.h b/src/ba81quad.h
> index 45cbe42..d99b58c 100644
> --- a/src/ba81quad.h
> +++ b/src/ba81quad.h
> @@ -742,7 +742,7 @@ private:
>   int minItemsPerScore;
>   double weightSum;
>  public:
> - void setMinItemsPerScore(int mips);
> + void setMinItemsPerScore(int mips_);
>   std::vector rowSkip; // whether to treat the row as NA
>  
>   // workspace

> ___
> R-pkg-team mailing list
> r-pkg-t...@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/r-pkg-team


-- 
http://fam-tille.de



Bug#987833: r-cran-openmx: FTBFS on mips due to a variable called 'mips'

2021-04-30 Thread Yangfl
Source: r-cran-openmx
Tags: patch
Severity: minor

Hi,

r-cran-openmx FTBFS on mips (after fixing #987755), since a variable
is called 'mips' and on mips 'mips' is expanded to '1'. Please
consider applying this patch, adding a suffix to the variable 'mips'.
diff --git a/src/ba81quad.cpp b/src/ba81quad.cpp
index 3df6ee0..6ebca7d 100644
--- a/src/ba81quad.cpp
+++ b/src/ba81quad.cpp
@@ -212,7 +212,7 @@ void ifaGroup::import(const List )
 
 	paramRows = -1;
 	int pmatCols=-1;
-	int mips = 1;
+	int mips_ = 1;
 	int dataRows = 0;
 	NumericVector Rmean;
 	NumericMatrix Rcov;
@@ -272,7 +272,7 @@ void ifaGroup::import(const List )
 		} else if (strEQ(key, "qpoints")) {
 			qpoints = as(slotValue);
 		} else if (strEQ(key, "minItemsPerScore")) {
-			mips = as(slotValue);
+			mips_ = as(slotValue);
 		} else {
 			// ignore
 		}
@@ -313,7 +313,7 @@ void ifaGroup::import(const List )
 
 	setLatentDistribution(mean, cov);
 
-	setMinItemsPerScore(mips);
+	setMinItemsPerScore(mips_);
 
 	if (numItems() != pmatCols) {
 		mxThrow("item matrix implies %d items but spec is length %d",
@@ -422,13 +422,13 @@ void ba81NormalQuad::layer::setupOutcomes(ifaGroup )
 void ba81NormalQuad::setupOutcomes(class ifaGroup )
 { layers[0].setupOutcomes(ig); }
 
-void ifaGroup::setMinItemsPerScore(int mips)
+void ifaGroup::setMinItemsPerScore(int mips_)
 {
 	if (numItems() && mips > numItems()) {
 		mxThrow("minItemsPerScore (=%d) cannot be larger than the number of items (=%d)",
-			 mips, numItems());
+			 mips_, numItems());
 	}
-	minItemsPerScore = mips;
+	minItemsPerScore = mips_;
 }
 
 void ifaGroup::buildRowMult()
diff --git a/src/ba81quad.h b/src/ba81quad.h
index 45cbe42..d99b58c 100644
--- a/src/ba81quad.h
+++ b/src/ba81quad.h
@@ -742,7 +742,7 @@ private:
 	int minItemsPerScore;
 	double weightSum;
 public:
-	void setMinItemsPerScore(int mips);
+	void setMinItemsPerScore(int mips_);
 	std::vector rowSkip; // whether to treat the row as NA
 
 	// workspace