[R-pkg-team] Bug#987833: r-cran-openmx: FTBFS on mips due to a variable called 'mips'

Andreas Tille andreas at fam-tille.de
Wed May 5 08:38:03 BST 2021


Control: tags -1 upstream
Control: forwarded -1 Joshua Pritikin <jpritikin at pobox.com>

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 &Rlist)
>  
>  	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 &Rlist)
>  		} else if (strEQ(key, "qpoints")) {
>  			qpoints = as<int>(slotValue);
>  		} else if (strEQ(key, "minItemsPerScore")) {
> -			mips = as<int>(slotValue);
> +			mips_ = as<int>(slotValue);
>  		} else {
>  			// ignore
>  		}
> @@ -313,7 +313,7 @@ void ifaGroup::import(const List &Rlist)
>  
>  	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 &ig)
>  void ba81NormalQuad::setupOutcomes(class ifaGroup &ig)
>  { 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<bool> rowSkip;     // whether to treat the row as NA
>  
>  	// workspace

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


-- 
http://fam-tille.de



More information about the R-pkg-team mailing list