mirror of
https://github.com/AGWA/git-crypt.git
synced 2026-01-03 00:30:33 -08:00
Addresses -Wdeprecated-declarations warnings
changing all references of std::auto_ptr to std::unique_ptr and changing the implementation of get_directory_contents() to use readdir, which is now reentrant, instead of readdir_r. Signed-off-by: Andrew Ayer <agwa@andrewayer.name> Note: old implementations or readdir might not be re-entrant, but that's OK because git-crypt is not multi-threaded.
This commit is contained in:
committed by
Andrew Ayer
parent
edfa3dcb5f
commit
d3bb5aba46
@@ -63,8 +63,8 @@ Aes_ecb_encryptor::Aes_ecb_encryptor (const unsigned char* raw_key)
|
||||
|
||||
Aes_ecb_encryptor::~Aes_ecb_encryptor ()
|
||||
{
|
||||
// Note: Explicit destructor necessary because class contains an auto_ptr
|
||||
// which contains an incomplete type when the auto_ptr is declared.
|
||||
// Note: Explicit destructor necessary because class contains an unique_ptr
|
||||
// which contains an incomplete type when the unique_ptr is declared.
|
||||
|
||||
explicit_memset(&impl->key, '\0', sizeof(impl->key));
|
||||
}
|
||||
@@ -86,8 +86,8 @@ Hmac_sha1_state::Hmac_sha1_state (const unsigned char* key, size_t key_len)
|
||||
|
||||
Hmac_sha1_state::~Hmac_sha1_state ()
|
||||
{
|
||||
// Note: Explicit destructor necessary because class contains an auto_ptr
|
||||
// which contains an incomplete type when the auto_ptr is declared.
|
||||
// Note: Explicit destructor necessary because class contains an unique_ptr
|
||||
// which contains an incomplete type when the unique_ptr is declared.
|
||||
|
||||
HMAC_cleanup(&(impl->ctx));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user