From 98350fedab3e9340fb6aaad7e4397cece1670f65 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 11 Oct 2016 21:43:07 +1100 Subject: [PATCH] build: silence unused var/func warnings --- alloc/aligned.hpp | 2 ++ crypto/ice.cpp | 1 + term.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/alloc/aligned.hpp b/alloc/aligned.hpp index ec73f2d4..2cd034d0 100644 --- a/alloc/aligned.hpp +++ b/alloc/aligned.hpp @@ -41,6 +41,7 @@ namespace util::alloc { auto allocate (size_t bytes, size_t alignment) { + (void)alignment; CHECK_EQ (alignment, m_alignment); return m_successor.allocate (bytes, m_alignment); } @@ -58,6 +59,7 @@ namespace util::alloc { auto deallocate (void *ptr, size_t bytes, size_t alignment) { + (void)alignment; CHECK_EQ (alignment, m_alignment); return m_successor.deallocate (ptr, bytes, m_alignment); } diff --git a/crypto/ice.cpp b/crypto/ice.cpp index 39bf0659..43d67a06 100644 --- a/crypto/ice.cpp +++ b/crypto/ice.cpp @@ -392,6 +392,7 @@ ice::scheduleBuild (std::array &kb, void ice::set (const uint64_t *_key_first, const uint64_t *_key_last) { + (void)_key_last; CHECK_EQ ((unsigned)(_key_last - _key_first), m_size); auto key = reinterpret_cast (_key_first); diff --git a/term.cpp b/term.cpp index db2f1f4e..2a299a47 100644 --- a/term.cpp +++ b/term.cpp @@ -57,7 +57,7 @@ find_terminfo_path (const std::experimental::filesystem::path &dir, // throws an exception if not found static std::experimental::filesystem::path -find_terminfo_path (const std::string &key) +find_terminfo_path [[gnu::unused]] (const std::string &key) { // check if the path is explicitly listed. must not fall through. if (const char *dir = getenv ("TERMINFO")) {