Skip to content

Commit eb4f097

Browse files
pwnallcmumford
authored andcommitted
leveldb: Fix compilation warnings in port_posix_sse.cc on x86 (32-bit).
LE_LOAD64 is only used when _mm_crc32_u64 is available, on 64-bit x86 processors. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=148906169
1 parent d0883b6 commit eb4f097

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

port/port_posix_sse.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ static inline uint32_t LE_LOAD32(const uint8_t *p) {
3737
return word;
3838
}
3939

40+
#if defined(_M_X64) || defined(__x86_64__) // LE_LOAD64 is only used on x64.
41+
4042
// Used to fetch a naturally-aligned 64-bit word in little endian byte-order
4143
static inline uint64_t LE_LOAD64(const uint8_t *p) {
4244
uint64_t dword;
4345
memcpy(&dword, p, sizeof(dword));
4446
return dword;
4547
}
4648

49+
#endif // defined(_M_X64) || defined(__x86_64__)
50+
4751
static inline bool HaveSSE42() {
4852
#if defined(_MSC_VER)
4953
int cpu_info[4];

0 commit comments

Comments
 (0)