Skip to content

Commit

Permalink
Merge pull request #747 from DARMA-tasking/647-fix-compiler-warnings
Browse files Browse the repository at this point in the history
#647 fix format-string type warnings
  • Loading branch information
lifflander authored Apr 8, 2020
2 parents 40fdd83 + 586d583 commit 1277ce4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/vt/trace/trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,8 @@ void Trace::writeTracesFile(int flush, bool is_incremental_flush) {
"Event must exist that was logged"
);

TraceEntrySeqType event_seq_id = log.ep == no_trace_entry_id
// Widen to unsigned long for %lu format
unsigned long event_seq_id = log.ep == no_trace_entry_id
? 0 // no_trace_entry_seq != 0 (perhaps shift offsets..).
: TraceRegistry::getEvent(log.ep).theEventSeq();

Expand All @@ -915,7 +916,7 @@ void Trace::writeTracesFile(int flush, bool is_incremental_flush) {
auto const& sdata = log.sys_data();
gzprintf(
gzfile,
"%d %d %lu %lld %d %d %d 0 %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " 0\n",
"%d %d %lu %lld %d %d %zu 0 %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " 0\n",
type,
eTraceEnvelopeTypes::ForChareMsg,
event_seq_id,
Expand All @@ -934,7 +935,7 @@ void Trace::writeTracesFile(int flush, bool is_incremental_flush) {
auto const& sdata = log.sys_data();
gzprintf(
gzfile,
"%d %d %lu %lld %d %d %d 0 %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " 0\n",
"%d %d %lu %lld %d %d %zu 0 %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " 0\n",
type,
eTraceEnvelopeTypes::ForChareMsg,
event_seq_id,
Expand Down Expand Up @@ -974,15 +975,14 @@ void Trace::writeTracesFile(int flush, bool is_incremental_flush) {
auto const& sdata = log.sys_data();
gzprintf(
gzfile,
"%d %d %lu %lld %d %d %d %d %d\n",
"%d %d %lu %lld %d %d %zu 0 %d\n",
type,
eTraceEnvelopeTypes::ForChareMsg,
event_seq_id,
converted_time,
log.event,
log.node,
sdata.msg_len,
0,
num_nodes
);
break;
Expand All @@ -991,7 +991,7 @@ void Trace::writeTracesFile(int flush, bool is_incremental_flush) {
auto const& sdata = log.sys_data();
gzprintf(
gzfile,
"%d %d %lu %lld %d %d %d 0\n",
"%d %d %lu %lld %d %d %zu 0\n",
type,
eTraceEnvelopeTypes::ForChareMsg,
event_seq_id,
Expand Down Expand Up @@ -1068,11 +1068,11 @@ void Trace::writeTracesFile(int flush, bool is_incremental_flush) {
);
break;
}
case TraceConstantsType::MessageRecv:
vtAssert(false, "Message receive log type unimplemented");
break;
default:
vtAssertInfo(false, "Unimplemented log type", converted_time, log.node);
auto log_type = static_cast<std::underlying_type<TraceConstantsType>::type>(log.type);
vtAssertInfo(false,
"Unimplemented log type", converted_time, log.node, log_type
);
}

// Poof!
Expand Down
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/balance/proc_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ void StatsRestartReader::inputStatsFile(
fpos_t pos;
bool finished = false;
while (!finished) {
if (fscanf(pFile, "%zu %c %llu %c %lf", &phaseID, &separator, &elmID,
&separator, &tval) > 0) {
if (fscanf(pFile, "%zu %c %lu %c %lf",
&phaseID, &separator, &elmID, &separator, &tval) > 0) {
fgetpos (pFile,&pos);
fscanf (pFile, "%c", &separator);
if (separator == ',') {
Expand Down

0 comments on commit 1277ce4

Please sign in to comment.