Cleared most "Conditional jump or move depends on uninitialised value" (Issue 223)

pull/239/head
Jeffrey Walton 2016-07-13 00:40:07 -04:00
parent b0b7b71562
commit 8281e51e94
1 changed files with 5 additions and 4 deletions

View File

@ -48,19 +48,20 @@ CRYPTOPP_COMPILE_ASSERT(sizeof(dword) == 2*sizeof(word));
#if HAVE_GCC_INIT_PRIORITY
CRYPTOPP_COMPILE_ASSERT(CRYPTOPP_INIT_PRIORITY >= 101);
const std::string DEFAULT_CHANNEL __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 25)));
const std::string DEFAULT_CHANNEL __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 25))) = "";
const std::string AAD_CHANNEL __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 26))) = "AAD";
const std::string &BufferedTransformation::NULL_CHANNEL = DEFAULT_CHANNEL;
#elif HAVE_MSC_INIT_PRIORITY
#pragma warning(disable: 4073)
#pragma init_seg(lib)
const std::string DEFAULT_CHANNEL;
const std::string DEFAULT_CHANNEL = "";
const std::string AAD_CHANNEL = "AAD";
const std::string &BufferedTransformation::NULL_CHANNEL = DEFAULT_CHANNEL;
#pragma warning(default: 4073)
#else
const std::string DEFAULT_CHANNEL;
const std::string AAD_CHANNEL = "AAD";
static const std::string s1(""), s2("AAD");
const std::string DEFAULT_CHANNEL = s1;
const std::string AAD_CHANNEL = s2;
const std::string &BufferedTransformation::NULL_CHANNEL = DEFAULT_CHANNEL;
#endif