diff options
author | Philip Tricca <philip.b.tricca@intel.com> | 2018-01-19 14:41:57 -0800 |
---|---|---|
committer | Philip Tricca <philip.b.tricca@intel.com> | 2018-01-22 17:25:31 -0800 |
commit | 1ae4cffb76133cc514d4e244633636f711b35992 (patch) | |
tree | c88ef87c0e6637fa6e6e60df95358e4d93339d2a /include | |
parent | c6de0010713db2561b4dbbfa3b4c63cb5c5ae90e (diff) | |
download | tpm2-tss-1ae4cffb76133cc514d4e244633636f711b35992.tar.gz |
tcti-device: Deprecate the old InitDeviceTcti function.
We use the gcc 'deprecated' attribute to generate compiler warnings for
consumers building against this branch. This required some fixups in the
test harness were all references to the deprecated function are now
replaced by the Tss2_Tcti_Device_Init function. During the transiton
from the old to the new init functions we've had to define a private
version of the old function to alow its use internally through a
function that isn't marked as 'deprecated'.
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/tcti/common.h | 6 | ||||
-rw-r--r-- | include/tcti/tcti_device.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/tcti/common.h b/include/tcti/common.h index c493ea93..49703a7c 100644 --- a/include/tcti/common.h +++ b/include/tcti/common.h @@ -30,6 +30,12 @@ #include <sapi/tpm20.h> +#if defined (__GNUC__) +#define COMPILER_ATTR(...) __attribute__((__VA_ARGS__)) +#else +#define COMPILER_ATTR(...) +#endif + typedef enum { NO_PREFIX = 0, RM_PREFIX = 1 } printf_type; typedef int (*TCTI_LOG_CALLBACK)( void *data, printf_type type, const char *format, ...); typedef int (*TCTI_LOG_BUFFER_CALLBACK)( void *useriData, printf_type type, UINT8 *buffer, UINT32 length); diff --git a/include/tcti/tcti_device.h b/include/tcti/tcti_device.h index dca7e632..5f52f004 100644 --- a/include/tcti/tcti_device.h +++ b/include/tcti/tcti_device.h @@ -46,7 +46,7 @@ TSS2_RC InitDeviceTcti ( TSS2_TCTI_CONTEXT *tctiContext, // OUT size_t *contextSize, // IN/OUT const TCTI_DEVICE_CONF *config // IN - ); + ) COMPILER_ATTR (deprecated); TSS2_RC Tss2_Tcti_Device_Init ( TSS2_TCTI_CONTEXT *tctiContext, |