mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
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
This commit is contained in:
parent
44a5c2c860
commit
a14a5696e1
10
algparam.h
10
algparam.h
@ -5,6 +5,12 @@
|
||||
#include "smartptr.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)
|
||||
|
||||
//! 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
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,11 @@
|
||||
#include "fltrimpl.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
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
|
||||
#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
|
||||
|
@ -16,6 +16,11 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
CRYPTOPP_COMPILE_ASSERT(sizeof(byte) == 1);
|
||||
|
@ -6,6 +6,11 @@
|
||||
#include <time.h>
|
||||
#include <memory>
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
static const unsigned int MASH_ITERATIONS = 200;
|
||||
|
@ -11,6 +11,11 @@
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
Filter::Filter(BufferedTransformation *attachment)
|
||||
|
@ -23,6 +23,11 @@ extern "C" {_CRTIMP void __cdecl _CRT_DEBUGGER_HOOK(int);}
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
extern PowerUpSelfTestStatus g_powerUpSelfTestStatus;
|
||||
|
5
idea.cpp
5
idea.cpp
@ -4,6 +4,11 @@
|
||||
#include "idea.h"
|
||||
#include "misc.h"
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
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.")
|
||||
#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)
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
10
misc.h
10
misc.h
@ -41,6 +41,12 @@
|
||||
#include <byteswap.h>
|
||||
#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)
|
||||
|
||||
// ************** compile-time assertion ***************
|
||||
@ -1279,4 +1285,8 @@ inline T SafeLeftShift(T value)
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -14,6 +14,11 @@
|
||||
#include "hrtimer.h"
|
||||
#include <time.h>
|
||||
|
||||
#if GCC_DIAGNOSTIC_AWARE
|
||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
RandomPool::RandomPool()
|
||||
|
Loading…
Reference in New Issue
Block a user