Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix Compiler Warnings #84
Fix for bitshares/bitshares-core#1383
Several compiler warnings have appeared due to upgrades of compilers and OpenSSL.
Synopsis of changes:
rand.hpp - OpenSSL's CRYPTO_pseudo_random_bytes has been deprecated. This is used in only 1 place in Bitshares, and should be replaced with fc::rand_bytes (net/node.cpp).
openssl.cpp - OPENSSL_config(nullptr) is no longer needed with OpenSSL 1.1. It has been replaced with an init function that is automatically called with defaults when needed.
The rest of the changes were simply to squelch compiler warnings and SHOULD NOT change code logic.
I reverted the change for the null check, and the warning has reappeared. Personally, I think the warning should stay there until a better fix is provided.
A different quick fix is to do the compare using a macro, casting to void*. But it seems wrong to me to add such code just to avoid a warning. Please share your thoughts.