[llvm-commits] CVS: llvm/include/llvm/CodeGen/ELFWriter.h
Jeff Cohen
jeffc at jolt-lang.org
Mon Feb 6 19:34:47 PST 2006
Changes in directory llvm/include/llvm/CodeGen:
ELFWriter.h updated: 1.10 -> 1.11
---
Log message:
Fix some truncation warnings.
---
Diffs of the changes: (+16 -16)
ELFWriter.h | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
Index: llvm/include/llvm/CodeGen/ELFWriter.h
diff -u llvm/include/llvm/CodeGen/ELFWriter.h:1.10 llvm/include/llvm/CodeGen/ELFWriter.h:1.11
--- llvm/include/llvm/CodeGen/ELFWriter.h:1.10 Sat Jul 16 12:40:34 2005
+++ llvm/include/llvm/CodeGen/ELFWriter.h Mon Feb 6 21:34:35 2006
@@ -256,23 +256,23 @@
}
void outxword(DataBuffer &Output, uint64_t X) {
if (isLittleEndian) {
- Output.push_back((X >> 0) & 255);
- Output.push_back((X >> 8) & 255);
- Output.push_back((X >> 16) & 255);
- Output.push_back((X >> 24) & 255);
- Output.push_back((X >> 32) & 255);
- Output.push_back((X >> 40) & 255);
- Output.push_back((X >> 48) & 255);
- Output.push_back((X >> 56) & 255);
+ Output.push_back(unsigned(X >> 0) & 255);
+ Output.push_back(unsigned(X >> 8) & 255);
+ Output.push_back(unsigned(X >> 16) & 255);
+ Output.push_back(unsigned(X >> 24) & 255);
+ Output.push_back(unsigned(X >> 32) & 255);
+ Output.push_back(unsigned(X >> 40) & 255);
+ Output.push_back(unsigned(X >> 48) & 255);
+ Output.push_back(unsigned(X >> 56) & 255);
} else {
- Output.push_back((X >> 56) & 255);
- Output.push_back((X >> 48) & 255);
- Output.push_back((X >> 40) & 255);
- Output.push_back((X >> 32) & 255);
- Output.push_back((X >> 24) & 255);
- Output.push_back((X >> 16) & 255);
- Output.push_back((X >> 8) & 255);
- Output.push_back((X >> 0) & 255);
+ Output.push_back(unsigned(X >> 56) & 255);
+ Output.push_back(unsigned(X >> 48) & 255);
+ Output.push_back(unsigned(X >> 40) & 255);
+ Output.push_back(unsigned(X >> 32) & 255);
+ Output.push_back(unsigned(X >> 24) & 255);
+ Output.push_back(unsigned(X >> 16) & 255);
+ Output.push_back(unsigned(X >> 8) & 255);
+ Output.push_back(unsigned(X >> 0) & 255);
}
}
void outaddr32(DataBuffer &Output, unsigned X) {
More information about the llvm-commits
mailing list