aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-09-21 21:29:55 -0400
committerbunnei <bunneidev@gmail.com>2015-09-21 21:29:55 -0400
commit4a07e855cdcef8a78a0a08a35dd92720f1fd6eb0 (patch)
tree4590343a003cedb3116fbc2ecf1da83354e90c56 /src/common
parent8a434a954e9d6ad2dda79784d8ec5e87e5ee43ff (diff)
parent2c2f1250d2015430430189c1b66a8cd9c9110409 (diff)
Merge pull request #1160 from lioncash/clang
Silence some clang warnings
Diffstat (limited to 'src/common')
-rw-r--r--src/common/file_util.cpp4
-rw-r--r--src/common/hash.cpp16
2 files changed, 2 insertions, 18 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 836b58d527..dcb9baa083 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -861,8 +861,8 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam
const std::string forbidden_characters = ".\"/\\[]:;=, ";
// On a FAT32 partition, 8.3 names are stored as a 11 bytes array, filled with spaces.
- short_name = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0'};
- extension = {' ', ' ', ' ', '\0'};
+ short_name = {{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0'}};
+ extension = {{' ', ' ', ' ', '\0'}};
std::string::size_type point = filename.rfind('.');
if (point == filename.size() - 1)
diff --git a/src/common/hash.cpp b/src/common/hash.cpp
index 413e9c6f1b..c49c2f60eb 100644
--- a/src/common/hash.cpp
+++ b/src/common/hash.cpp
@@ -17,27 +17,11 @@ namespace Common {
// Block read - if your platform needs to do endian-swapping or can only handle aligned reads, do
// the conversion here
-
-static FORCE_INLINE u32 getblock32(const u32* p, int i) {
- return p[i];
-}
-
static FORCE_INLINE u64 getblock64(const u64* p, int i) {
return p[i];
}
// Finalization mix - force all bits of a hash block to avalanche
-
-static FORCE_INLINE u32 fmix32(u32 h) {
- h ^= h >> 16;
- h *= 0x85ebca6b;
- h ^= h >> 13;
- h *= 0xc2b2ae35;
- h ^= h >> 16;
-
- return h;
-}
-
static FORCE_INLINE u64 fmix64(u64 k) {
k ^= k >> 33;
k *= 0xff51afd7ed558ccdllu;