diff options
author | Jack Lloyd <[email protected]> | 2017-10-02 22:42:40 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-02 22:42:40 -0400 |
commit | c5c8a58a3f5006bb13120654d0304f3e6ae67c67 (patch) | |
tree | f2a6579eb91a33e9656a6f301501a74ed2625d27 | |
parent | a27a5a2adb10666624cd2ba1e5c046a006808835 (diff) |
Avoid using namespace in FFI headers
Internal only headers but Sonar doesn't know that
-rw-r--r-- | src/lib/ffi/ffi_mp.h | 2 | ||||
-rw-r--r-- | src/lib/ffi/ffi_pkey.cpp | 2 | ||||
-rw-r--r-- | src/lib/ffi/ffi_pkey.h | 2 | ||||
-rw-r--r-- | src/lib/ffi/ffi_rng.h | 2 | ||||
-rw-r--r-- | src/lib/ffi/ffi_util.h | 2 |
5 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/ffi/ffi_mp.h b/src/lib/ffi/ffi_mp.h index 448d20e56..3cc85b66a 100644 --- a/src/lib/ffi/ffi_mp.h +++ b/src/lib/ffi/ffi_mp.h @@ -12,8 +12,6 @@ extern "C" { -using namespace Botan_FFI; - BOTAN_FFI_DECLARE_STRUCT(botan_mp_struct, Botan::BigInt, 0xC828B9D2); } diff --git a/src/lib/ffi/ffi_pkey.cpp b/src/lib/ffi/ffi_pkey.cpp index 16b3a4208..e377f13e7 100644 --- a/src/lib/ffi/ffi_pkey.cpp +++ b/src/lib/ffi/ffi_pkey.cpp @@ -21,6 +21,8 @@ extern "C" { +using namespace Botan_FFI; + int botan_privkey_create(botan_privkey_t* key_obj, const char* algo_name, const char* algo_params, diff --git a/src/lib/ffi/ffi_pkey.h b/src/lib/ffi/ffi_pkey.h index a61087ef0..de5e19dd0 100644 --- a/src/lib/ffi/ffi_pkey.h +++ b/src/lib/ffi/ffi_pkey.h @@ -12,8 +12,6 @@ extern "C" { -using namespace Botan_FFI; - BOTAN_FFI_DECLARE_STRUCT(botan_pubkey_struct, Botan::Public_Key, 0x2C286519); BOTAN_FFI_DECLARE_STRUCT(botan_privkey_struct, Botan::Private_Key, 0x7F96385E); diff --git a/src/lib/ffi/ffi_rng.h b/src/lib/ffi/ffi_rng.h index 395e7d9d9..2117853c4 100644 --- a/src/lib/ffi/ffi_rng.h +++ b/src/lib/ffi/ffi_rng.h @@ -12,8 +12,6 @@ extern "C" { -using namespace Botan_FFI; - BOTAN_FFI_DECLARE_STRUCT(botan_rng_struct, Botan::RandomNumberGenerator, 0x4901F9C1); } diff --git a/src/lib/ffi/ffi_util.h b/src/lib/ffi/ffi_util.h index 7f959259c..ae48ab01a 100644 --- a/src/lib/ffi/ffi_util.h +++ b/src/lib/ffi/ffi_util.h @@ -46,7 +46,7 @@ struct botan_struct }; #define BOTAN_FFI_DECLARE_STRUCT(NAME, TYPE, MAGIC) \ - struct NAME final : public botan_struct<TYPE, MAGIC> { explicit NAME(TYPE* x) : botan_struct(x) {} } + struct NAME final : public Botan_FFI::botan_struct<TYPE, MAGIC> { explicit NAME(TYPE* x) : botan_struct(x) {} } // Declared in ffi.cpp int ffi_error_exception_thrown(const char* func_name, const char* exn); |