Control: tags -1 upstream Control: forwarded -1 Joshua Pritikin <jpriti...@pobox.com>
Hi Joshua, I wonder whether you want to fix this issue with the suggested patch upstream. Kind regards Andreas. On Thu, Apr 29, 2021 at 11:10:46AM +0800, Yangfl wrote: > Source: r-cran-rpf > Tags: patch > Severity: minor > > Hi, > > r-cran-rpf FTBFS on mips, since a variable is called 'mips' and on > mips 'mips' is expanded to '1'. Lines in question: > > ba81quad.h:743:31: error: expected ‘,’ or ‘...’ before numeric constant > 743 | void setMinItemsPerScore(int mips); > | ^~~~ > ba81quad.cpp: In member function ‘void ifaGroup::import(const List&)’: > ba81quad.cpp:214:6: error: expected unqualified-id before numeric constant > 214 | int mips = 1; > | ^~~~ > ba81quad.cpp:274:4: error: lvalue required as left operand of assignment > 274 | mips = as<int>(slotValue); > | ^~~~ > ba81quad.cpp: At global scope: > ba81quad.cpp:426:40: error: expected ‘,’ or ‘...’ before numeric constant > 426 | void ifaGroup::setMinItemsPerScore(int mips) > | ^~~~ > > Please consider applying this patch, adding a suffix to the variable 'mips'. > diff --git a/src/ba81quad.cpp b/src/ba81quad.cpp > index 60d276c..d6419ce 100644 > --- a/src/ba81quad.cpp > +++ b/src/ba81quad.cpp > @@ -211,7 +211,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; > @@ -271,7 +271,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 > } > @@ -312,7 +312,7 @@ void ifaGroup::import(const List &Rlist) > > setLatentDistribution(mean, cov); > > - setMinItemsPerScore(mips); > + setMinItemsPerScore(mips_); > > if (numItems() != pmatCols) { > stop("item matrix implies %d items but spec is length %d", > @@ -423,13 +423,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()) { > + if (numItems() && mips_ > numItems()) { > stop("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 3e60a86..39c5eb1 100644 > --- a/src/ba81quad.h > +++ b/src/ba81quad.h > @@ -740,7 +740,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-t...@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/r-pkg-team -- http://fam-tille.de