I used Enum constant as a case of swict statement and trying to select by using the pointer to the structure , which internally has a union and a enum member.
the union member again internally have three structures.
even i debugged the code.
the value of the variable
s -> st is getting the correct value in debug mode but the function is returning -1.
Please have a look into the code in the attachment.