Skip to content

Commit

Permalink
Merge pull request #652 from pah/apple-fix-xcode
Browse files Browse the repository at this point in the history
sc_vcd_trace.cpp: clang does not have -Wformat-truncation
  • Loading branch information
lmailletcontoz authored Apr 2, 2024
2 parents 0adb389 + 9168fce commit 242ddbf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/sysc/tracing/sc_vcd_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,14 @@ vcd_trace::compose_data_line(char* rawdata, char* compdata, size_t compdata_n)
// https://github.com/OSCI-WG/systemc/pull/642
// https://github.com/OSCI-WG/systemc/issues/600
// https://github.com/OSCI-WG/systemc/pull/645
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation"
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-truncation"
#endif
std::snprintf(compdata, compdata_n, "b%s %s", effective_begin, vcd_name.c_str());
#pragma GCC diagnostic pop

#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic pop
#endif
}
}
}
Expand Down

0 comments on commit 242ddbf

Please sign in to comment.