Enable unused-function warning for runtime (#4628)

This commit is contained in:
Alexander Shabalin
2021-01-11 20:45:02 +03:00
committed by Nikolay Krasko
parent 8bb76c67e3
commit 32e3deace1
6 changed files with 12 additions and 35 deletions
@@ -57,11 +57,6 @@ uint32_t Fetch32(const char *p) {
return uint32_in_expected_order(UNALIGNED_LOAD32(p));
}
uint32_t Rotate32(uint32_t val, int shift) {
// Avoid shifting by 32: doing so yields an undefined result.
return shift == 0 ? val : ((val >> shift) | (val << (32 - shift)));
}
// Bitwise right rotate. Normally this will compile to a single
// instruction, especially if the shift is a manifest constant.
uint64_t Rotate(uint64_t val, int shift) {
@@ -23,18 +23,6 @@
namespace {
constexpr uint32_t PrintableHexSize(uint32_t input_length) {
return input_length * 2;
}
void PrintableHex(const uint8_t* data, uint32_t data_length, char* hex) {
static const char* hex_digits = "0123456789ABCDEF";
for (uint32_t i = 0; i < data_length; ++i) {
*hex++ = hex_digits[(*data >> 4) & 0xf];
*hex++ = hex_digits[(*data++) & 0xf];
}
}
constexpr uint32_t PrintableBase64Size(uint32_t input_length) {
return ((input_length + 2) / 3 * 4) + 1;
}