Skip to content

Commit 3c2830e

Browse files
authored
Merge pull request #21 from NREL/compiler-warnings
Compiler warnings etc.
2 parents 703daf7 + 06274fb commit 3c2830e

18 files changed

+630
-250
lines changed

app/clusterthread.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,16 @@ void ClusterThread::StartThread() //Entry()
135135

136136

137137
//Simulate for each time
138-
StatusLock.lock();
139-
bool is_cancel = this->CancelFlag; //check for cancelled simulation
140-
StatusLock.unlock();
141-
if (is_cancel) {
142-
FinishedLock.lock();
143-
Finished = true;
144-
FinishedLock.unlock();
145-
return; // (wxThread::ExitCode)-1;
138+
{
139+
StatusLock.lock();
140+
bool is_cancel = this->CancelFlag; //check for cancelled simulation
141+
StatusLock.unlock();
142+
if (is_cancel) {
143+
FinishedLock.lock();
144+
Finished = true;
145+
FinishedLock.unlock();
146+
return; // (wxThread::ExitCode)-1;
147+
}
146148
}
147149

148150
ssc_module_t mod_mspt = ssc_module_create("tcsmolten_salt");
@@ -177,7 +179,6 @@ void ClusterThread::StartThread() //Entry()
177179
ssc_number_t wf_steps_per_hour;
178180
ssc_data_get_number(_ssc_data, "time_steps_per_hour", &wf_steps_per_hour);
179181
int nperday = (int)wf_steps_per_hour * 24;
180-
int nrec = (int)wf_steps_per_hour * 8760;
181182

182183
// Update solar field hourly availability to reflect cluster-average values for this exemplar simulation
183184
std::vector<double> sfavail_sim = *_sf_avail;
@@ -223,7 +224,6 @@ void ClusterThread::StartThread() //Entry()
223224
{
224225
message_handler("SSC simulation failed");
225226
int ty; float tms;
226-
bool chck=true;
227227
for (int k = 0; ; k++)
228228
{
229229
const char *msg = ssc_module_log(mod_mspt, k, &ty, &tms);

app/daotk_app.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,12 @@ bool MainWindow::Load(const wxString &file)
640640
case lk::vardata_t::VECTOR:
641641
{
642642
//determine whether this is a 1D or 2D array
643-
int nr, nc=0;
644643
if( jv.HasMember("ms") ) //matrix shape
645644
{
646645
//matrix
647646
int ms[2];
648-
ms[0] = jv["ms"].GetArray()[0].GetInt();
649-
ms[1] = jv["ms"].GetArray()[1].GetInt();
647+
int nr = ms[0] = jv["ms"].GetArray()[0].GetInt();
648+
int nc = ms[1] = jv["ms"].GetArray()[1].GetInt();
650649

651650
if( (int)jv["d"].GetArray().Size() != ms[0]*ms[1]*4)
652651
{

0 commit comments

Comments
 (0)