summaryrefslogtreecommitdiff
path: root/secblock.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-01-14 19:08:56 -0500
committerJeffrey Walton <noloader@gmail.com>2016-01-14 19:08:56 -0500
commit2b7dba4fa65ab72e75d6867468eeb1da40390daf (patch)
treec97e812c6cb5d53aba6aa99a3b7b4dd5052405b0 /secblock.h
parent58b7d1c41302b051fe9a30076372db890a15563e (diff)
downloadcryptopp-git-2b7dba4fa65ab72e75d6867468eeb1da40390daf.tar.gz
Suppressed false positives on -Wcast-align warning
Diffstat (limited to 'secblock.h')
-rw-r--r--secblock.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/secblock.h b/secblock.h
index 715ee1f6..011af0e4 100644
--- a/secblock.h
+++ b/secblock.h
@@ -408,6 +408,12 @@ public:
size_type max_size() const {return STDMAX(m_fallbackAllocator.max_size(), S);}
private:
+
+#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wcast-align"
+#endif
+
#ifdef __BORLANDC__
T* GetAlignedArray() {return m_array;}
T m_array[S];
@@ -415,6 +421,11 @@ private:
T* GetAlignedArray() {return (CRYPTOPP_BOOL_ALIGN16 && T_Align16) ? (T*)(((byte *)m_array) + (0-(size_t)m_array)%16) : m_array;}
CRYPTOPP_ALIGN_DATA(8) T m_array[(CRYPTOPP_BOOL_ALIGN16 && T_Align16) ? S+8/sizeof(T) : S];
#endif
+
+#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
+# pragma GCC diagnostic pop
+#endif
+
A m_fallbackAllocator;
bool m_allocated;
};