mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-26 14:02:59 +00:00
Use stdint types everywhere
R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -156,7 +156,7 @@ const char *kStrtabName = ".strtab";
|
||||
const int demangleLen = 20000;
|
||||
|
||||
// Offset to the string table.
|
||||
u_int64_t stringOffset = 0;
|
||||
uint64_t stringOffset = 0;
|
||||
|
||||
// Update the offset to the start of the string index of the next
|
||||
// object module for every N_ENDM stabs.
|
||||
|
||||
@@ -53,10 +53,10 @@ class GUIDGenerator {
|
||||
|
||||
bool CreateGUID(GUID *guid) const {
|
||||
guid->data1 = random();
|
||||
guid->data2 = (u_int16_t)(random());
|
||||
guid->data3 = (u_int16_t)(random());
|
||||
*reinterpret_cast<u_int32_t*>(&guid->data4[0]) = random();
|
||||
*reinterpret_cast<u_int32_t*>(&guid->data4[4]) = random();
|
||||
guid->data2 = (uint16_t)(random());
|
||||
guid->data3 = (uint16_t)(random());
|
||||
*reinterpret_cast<uint32_t*>(&guid->data4[0]) = random();
|
||||
*reinterpret_cast<uint32_t*>(&guid->data4[4]) = random();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -74,8 +74,8 @@ bool GUIDToString(const GUID *guid, char *buf, int buf_len) {
|
||||
assert(buf_len > kGUIDStringLength);
|
||||
int num = snprintf(buf, buf_len, kGUIDFormatString,
|
||||
guid->data1, guid->data2, guid->data3,
|
||||
*reinterpret_cast<const u_int32_t *>(&(guid->data4[0])),
|
||||
*reinterpret_cast<const u_int32_t *>(&(guid->data4[4])));
|
||||
*reinterpret_cast<const uint32_t *>(&(guid->data4[0])),
|
||||
*reinterpret_cast<const uint32_t *>(&(guid->data4[4])));
|
||||
if (num != kGUIDStringLength)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user