Added GCC_DIAGNOSTIC_AWARE to help suppress some warnings on contemporary compilers. The macro was needed to help with managing old compilers, like GCC 4.2.1, present on OpenBSD
parent
44a5c2c860
commit
a14a5696e1
10
algparam.h
10
algparam.h
|
|
@ -5,6 +5,12 @@
|
||||||
#include "smartptr.h"
|
#include "smartptr.h"
|
||||||
#include "secblock.h"
|
#include "secblock.h"
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
//! used to pass byte array input as part of a NameValuePairs object
|
//! used to pass byte array input as part of a NameValuePairs object
|
||||||
|
|
@ -396,4 +402,8 @@ AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwI
|
||||||
|
|
||||||
NAMESPACE_END
|
NAMESPACE_END
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,11 @@
|
||||||
#include "fltrimpl.h"
|
#include "fltrimpl.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
void BaseN_Encoder::IsolatedInitialize(const NameValuePairs ¶meters)
|
void BaseN_Encoder::IsolatedInitialize(const NameValuePairs ¶meters)
|
||||||
|
|
|
||||||
4
config.h
4
config.h
|
|
@ -456,4 +456,8 @@ NAMESPACE_END
|
||||||
#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
|
#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Used to supress some warnings in some header and implmentation files.
|
||||||
|
// GCC_DIAGNOSTIC_AWARE is used because some platforms, like OpenBSD, use old compilers.
|
||||||
|
#define GCC_DIAGNOSTIC_AWARE (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
CRYPTOPP_COMPILE_ASSERT(sizeof(byte) == 1);
|
CRYPTOPP_COMPILE_ASSERT(sizeof(byte) == 1);
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
static const unsigned int MASH_ITERATIONS = 200;
|
static const unsigned int MASH_ITERATIONS = 200;
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,11 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
Filter::Filter(BufferedTransformation *attachment)
|
Filter::Filter(BufferedTransformation *attachment)
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ extern "C" {_CRTIMP void __cdecl _CRT_DEBUGGER_HOOK(int);}
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
extern PowerUpSelfTestStatus g_powerUpSelfTestStatus;
|
extern PowerUpSelfTestStatus g_powerUpSelfTestStatus;
|
||||||
|
|
|
||||||
5
idea.cpp
5
idea.cpp
|
|
@ -4,6 +4,11 @@
|
||||||
#include "idea.h"
|
#include "idea.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
static const int IDEA_KEYLEN=(6*IDEA::ROUNDS+4); // key schedule length in # of word16s
|
static const int IDEA_KEYLEN=(6*IDEA::ROUNDS+4); // key schedule length in # of word16s
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,11 @@
|
||||||
#pragma message("You do not seem to have the Visual C++ Processor Pack installed, so use of SSE2 instructions will be disabled.")
|
#pragma message("You do not seem to have the Visual C++ Processor Pack installed, so use of SSE2 instructions will be disabled.")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CRYPTOPP_INTEGER_SSE2 (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && CRYPTOPP_BOOL_X86)
|
#define CRYPTOPP_INTEGER_SSE2 (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && CRYPTOPP_BOOL_X86)
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
|
||||||
10
misc.h
10
misc.h
|
|
@ -41,6 +41,12 @@
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
// ************** compile-time assertion ***************
|
// ************** compile-time assertion ***************
|
||||||
|
|
@ -1279,4 +1285,8 @@ inline T SafeLeftShift(T value)
|
||||||
|
|
||||||
NAMESPACE_END
|
NAMESPACE_END
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@
|
||||||
#include "hrtimer.h"
|
#include "hrtimer.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
RandomPool::RandomPool()
|
RandomPool::RandomPool()
|
||||||
|
|
|
||||||
5
wake.cpp
5
wake.cpp
|
|
@ -3,6 +3,11 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "wake.h"
|
#include "wake.h"
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
void WAKE_TestInstantiations()
|
void WAKE_TestInstantiations()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue