Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
further warning fixes for cran submission.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornig committed Dec 11, 2012
1 parent e0598a3 commit f716fe7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Technical notes:
BUILDING:

The R source package can be built from the working copy with the
"R CMD build --no-resave-data ." command. To build a binary package,
use "R CMD build --binary --no-resave-data ." command.
"R CMD build --no-resave-data R-package" command. To build a binary package,
use "R CMD build --binary --no-resave-data R-package" command.

NOTE: When working on Windows, the same command will work, but the Rtools package
needs to be installed and all its bin/ dirs (bin/, perl/bin, MinGW/bin) as
Expand Down
2 changes: 2 additions & 0 deletions R-package/src/common/commonutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void setPosixLocale()

//----

/* Commented out, because it uses printf (prohibited under R)
int DebugCall::depth;
DebugCall::DebugCall(const char *fmt,...)
Expand All @@ -61,6 +62,7 @@ DebugCall::~DebugCall()
{
printf("%*s -- %s\n", --depth*2, "", funcname.c_str());
}
*/

//----

Expand Down
3 changes: 3 additions & 0 deletions R-package/src/common/commonutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ COMMON_API void setPosixLocale();
* Debugging aid: prints a message on entering/leaving methods; message
* gets indented according to call depth. See TRACE macro.
*/

/* Commented out, because it uses printf (prohibited under R)
class COMMON_API DebugCall
{
private:
Expand All @@ -93,6 +95,7 @@ class COMMON_API DebugCall
};
#define TRACE DebugCall __x
*/

/**
* Performs the RDTSC (read time stamp counter) x86 instruction, and returns
Expand Down
2 changes: 1 addition & 1 deletion R-package/src/loadDataset.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ SEXP exportDataset(ResultFileManager &manager, const IDList &idlist)
{
int paramsCount = 0, attrCount = 0, runAttrCount = 0;

SEXP dataset, names;
SEXP dataset;
PROTECT(dataset = NEW_LIST(9));
setNames(dataset, datasetColumnNames, datasetColumnsLength);

Expand Down
4 changes: 2 additions & 2 deletions R-package/src/scave/export.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ double JoinedDataTable::getDoubleValue(int row, int col) const

void JoinedDataTable::mapTableCell(int row, int col, DataTable* &table, int &tableRow, int &tableCol) const
{
Assert(0 <= row && row < rowCount && 0 <= col && col < columnMap.size());
Assert(0 <= row && row < rowCount && 0 <= col && col < (int)columnMap.size());

if (col == 0)
{
Expand Down Expand Up @@ -494,7 +494,7 @@ void ScaveExport::saveVector(const string &name, const string &description,
void ScaveExport::saveVectors(const string &name, const string &description,
const IDList &vectors, const vector<XYArray*> xyArrays, const ResultFileManager &manager)
{
Assert(vectors.size() == xyArrays.size());
Assert(vectors.size() == (int)xyArrays.size());

vector<DataTable*> tables;
for (unsigned int i = 0; i < xyArrays.size(); ++i)
Expand Down
3 changes: 3 additions & 0 deletions R-package/src/scave/mergernodes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ void AggregatorNode::init()
case Count: count = 0; break;
case Minimum: acc = POSITIVE_INFINITY; break;
case Maximum: acc = NEGATIVE_INFINITY; break;
default: throw std::exception(); // cannot happen
}
}

Expand All @@ -151,6 +152,7 @@ void AggregatorNode::collect(double value)
case Count: count++; break;
case Minimum: acc = std::min(value, acc); break;
case Maximum: acc = std::max(value, acc); break;
default: throw std::exception(); // cannot happen
}
}

Expand All @@ -163,6 +165,7 @@ double AggregatorNode::result()
case Count: return count;
case Minimum:
case Maximum: return acc;
default: throw std::exception(); // cannot happen
}
}

Expand Down

0 comments on commit f716fe7

Please sign in to comment.