Skip to content

Commit

Permalink
Make sure the mainTask has a valid task record.
Browse files Browse the repository at this point in the history
Quiet a signed/unsigned warning.
  • Loading branch information
tomyhoi committed Jan 8, 2017
1 parent a91a5af commit 100e4eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/chplvis/DataModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ int DataModel::LoadData(const char * filename, bool fromArgv)

// Set the main task ID
mainTID = tid;
mainTask.taskRec = new E_task (0, 0, 0, tid, 0, 0, -1, -1);

// Debug
std::list<Event *>::iterator itr;
Expand Down Expand Up @@ -953,7 +954,7 @@ int DataModel::LoadFile (const char *fileToOpen, int index, double seq)
while (linedata[len] == '\n' || linedata[len] == ' ')
linedata[len] = 0;
const char *tag = strDB.getString(&linedata[nextCh]);
if (tagNames.size() <= tagId) {
if (tagNames.size() <= (unsigned)tagId) {
if (tagNames.size() == 0)
tagNames.resize(64);
else
Expand Down

0 comments on commit 100e4eb

Please sign in to comment.