diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-03-23 06:54:25 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-03-23 06:54:25 -0400 |
commit | ca9790a2db94e9fad36aa121e934f105348bdead (patch) | |
tree | 351d2e5795797c2f6cd68ed7d0447a623d0b4e6a /src | |
parent | 9727b1be189ab9990d4cb6783c16a7dae1b43c97 (diff) | |
download | gem5-ca9790a2db94e9fad36aa121e934f105348bdead.tar.xz |
Ruby: Fix Set::print for 32-bit hosts
This patch fixes a compilation error caused by a length mismatch on
32-bit hosts. The ifdef and sprintf is replaced by a csprintf.
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/ruby/common/Set.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mem/ruby/common/Set.cc b/src/mem/ruby/common/Set.cc index 12d0b2a21..afa606c56 100644 --- a/src/mem/ruby/common/Set.cc +++ b/src/mem/ruby/common/Set.cc @@ -352,13 +352,9 @@ Set::print(std::ostream& out) const } char buff[24]; - out << "[Set (" << m_nSize << ") 0x "; + out << "[Set (" << m_nSize << ")"; for (int i = m_nArrayLen - 1; i >= 0; i--) { -#ifdef _LP64 - sprintf(buff,"0x %016llX ", (long long)m_p_nArray[i]); -#else - sprintf(buff,"%08X ", m_p_nArray[i]); -#endif // __32BITS__ + csprintf(buff," 0x%08X", m_p_nArray[i]); out << buff; } out << " ]"; |