Use C99 flexible array member

The structures PIN_MODIFY_STRUCTURE and PIN_VERIFY_STRUCTURE now use a
C99 flexible array member when available for abData field.

uint8_t abData[];

See http://lists.alioth.debian.org/pipermail/pcsclite-cvs-commit/2013-May/006191.html
This commit is contained in:
Frank Morgner 2013-05-27 12:45:31 +02:00 committed by Viktor Tarasov
parent 32c470469d
commit a7564d6f1e
1 changed files with 14 additions and 2 deletions

View File

@ -240,7 +240,13 @@ typedef struct
uint8_t bMsgIndex; /**< Message index (should be 00) */
uint8_t bTeoPrologue[3]; /**< T=1 block prologue field to use (fill with 00) */
uint32_t ulDataLength; /**< length of Data to be sent to the ICC */
uint8_t abData[1]; /**< Data to send to the ICC */
uint8_t abData
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
[] /* valid C99 code */
#else
[0] /* non-standard, but usually working code */
#endif
; /**< Data to send to the ICC */
} PIN_VERIFY_STRUCTURE;
/** structure used with \ref FEATURE_MODIFY_PIN_DIRECT */
@ -273,7 +279,13 @@ typedef struct
uint8_t bMsgIndex3; /**< index of 3d prompting message */
uint8_t bTeoPrologue[3]; /**< T=1 block prologue field to use (fill with 00) */
uint32_t ulDataLength; /**< length of Data to be sent to the ICC */
uint8_t abData[1]; /**< Data to send to the ICC */
uint8_t abData
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
[] /* valid C99 code */
#else
[0] /* non-standard, but usually working code */
#endif
; /**< Data to send to the ICC */
} PIN_MODIFY_STRUCTURE;
/* PIN_PROPERTIES as defined (in/up to?) PC/SC 2.02.05 */