mirror of
https://github.com/wownero/wownero.git
synced 2026-10-26 10:58:34 +01:00
fix: warning: unused-function
This commit is contained in:
@@ -66,21 +66,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#endif
|
#endif
|
||||||
/* Argon2 Team - End Code */
|
/* Argon2 Team - End Code */
|
||||||
|
|
||||||
static FORCE_INLINE uint32_t load32(const void *src) {
|
|
||||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
|
||||||
uint32_t w;
|
|
||||||
memcpy(&w, src, sizeof w);
|
|
||||||
return w;
|
|
||||||
#else
|
|
||||||
const uint8_t *p = (const uint8_t *)src;
|
|
||||||
uint32_t w = *p++;
|
|
||||||
w |= (uint32_t)(*p++) << 8;
|
|
||||||
w |= (uint32_t)(*p++) << 16;
|
|
||||||
w |= (uint32_t)(*p++) << 24;
|
|
||||||
return w;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE uint64_t load64_native(const void *src) {
|
static FORCE_INLINE uint64_t load64_native(const void *src) {
|
||||||
uint64_t w;
|
uint64_t w;
|
||||||
memcpy(&w, src, sizeof w);
|
memcpy(&w, src, sizeof w);
|
||||||
@@ -150,36 +135,6 @@ static FORCE_INLINE void store64(void *dst, uint64_t w) {
|
|||||||
|
|
||||||
/// BEGIN: blake2-impl.h
|
/// BEGIN: blake2-impl.h
|
||||||
|
|
||||||
static FORCE_INLINE uint64_t load48(const void *src) {
|
|
||||||
const uint8_t *p = (const uint8_t *)src;
|
|
||||||
uint64_t w = *p++;
|
|
||||||
w |= (uint64_t)(*p++) << 8;
|
|
||||||
w |= (uint64_t)(*p++) << 16;
|
|
||||||
w |= (uint64_t)(*p++) << 24;
|
|
||||||
w |= (uint64_t)(*p++) << 32;
|
|
||||||
w |= (uint64_t)(*p++) << 40;
|
|
||||||
return w;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE void store48(void *dst, uint64_t w) {
|
|
||||||
uint8_t *p = (uint8_t *)dst;
|
|
||||||
*p++ = (uint8_t)w;
|
|
||||||
w >>= 8;
|
|
||||||
*p++ = (uint8_t)w;
|
|
||||||
w >>= 8;
|
|
||||||
*p++ = (uint8_t)w;
|
|
||||||
w >>= 8;
|
|
||||||
*p++ = (uint8_t)w;
|
|
||||||
w >>= 8;
|
|
||||||
*p++ = (uint8_t)w;
|
|
||||||
w >>= 8;
|
|
||||||
*p++ = (uint8_t)w;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) {
|
|
||||||
return (w >> c) | (w << (32 - c));
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) {
|
static FORCE_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) {
|
||||||
return (w >> c) | (w << (64 - c));
|
return (w >> c) | (w << (64 - c));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user