зеркало из https://github.com/github/putty.git
testcrypt: fix a technically illegal forward-typedef.
Every compiler that's so far seen testcrypt.c has tolerated me writing 'typedef enum ValueType ValueType' before actually saying what 'enum ValueType' is, but one just pointed out that it's not actually legal standard C to do that. Moved the typedef to after the enum.
This commit is contained in:
Родитель
d4d89d51e9
Коммит
2a365bb08a
|
@ -81,7 +81,6 @@ int random_byte(void)
|
||||||
/* end of list */
|
/* end of list */
|
||||||
|
|
||||||
typedef struct Value Value;
|
typedef struct Value Value;
|
||||||
typedef enum ValueType ValueType;
|
|
||||||
|
|
||||||
enum ValueType {
|
enum ValueType {
|
||||||
#define VALTYPE_ENUM(n,t,f) VT_##n,
|
#define VALTYPE_ENUM(n,t,f) VT_##n,
|
||||||
|
@ -89,6 +88,8 @@ enum ValueType {
|
||||||
#undef VALTYPE_ENUM
|
#undef VALTYPE_ENUM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef enum ValueType ValueType;
|
||||||
|
|
||||||
const char *const type_names[] = {
|
const char *const type_names[] = {
|
||||||
#define VALTYPE_NAME(n,t,f) #n,
|
#define VALTYPE_NAME(n,t,f) #n,
|
||||||
VALUE_TYPES(VALTYPE_NAME)
|
VALUE_TYPES(VALTYPE_NAME)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче