So the main problem here is that you are returning a taus8_t
and trying to assign that to a taus88_t *
which is not valid, if you need to use pointers for reasons that are not obvious from the code then the fix is as follows:
taus88_t* TAUS88 = malloc(sizeof(taus88_t)) ;
*TAUS88 = make_taus88(6346456);
You must remember to call free
on the pointer though when you are done. A simpler approach, would be to skip using a pointer and do as follows:
taus88_t TAUS88 ;
TAUS88 = make_taus88(6346456);
u32 numberu32 = taus88u32(&TAUS88);
f32 numberf32 = taus88f32(&TAUS88);
Now you don't have to worry about calling free
anymore.
The other issue that I pointed out is that most likely taus88f32
violates strict aliasing
rules.