union initialization is not supported by ISO C

This commit is contained in:
Francois Perrad 2015-10-11 12:11:00 +02:00 committed by Steffen Jaeckel
parent 2404bd3c13
commit 759ed1f050
2 changed files with 4 additions and 2 deletions

View File

@ -34,7 +34,8 @@ int mp_export(void* rop, size_t* countp, int order, size_t size,
union {
unsigned int i;
char c[4];
} lint = {0x01020304};
} lint;
lint.i = 0x01020304;
endian = (lint.c[0] == 4 ? -1 : 1);
}

View File

@ -30,7 +30,8 @@ int mp_import(mp_int* rop, size_t count, int order, size_t size,
union {
unsigned int i;
char c[4];
} lint = {0x01020304};
} lint;
lint.i = 0x01020304;
endian = (lint.c[0] == 4 ? -1 : 1);
}