try to avoid aliasing of pointers enum {} vs int
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21503 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -72,12 +72,11 @@ length_type (const char *name, const Type *t,
|
||||
break;
|
||||
case TInteger:
|
||||
if(t->members) {
|
||||
char *s;
|
||||
asprintf(&s, "(const int*)%s", name);
|
||||
if(s == NULL)
|
||||
errx (1, "out of memory");
|
||||
length_primitive ("integer", s, variable);
|
||||
free(s);
|
||||
fprintf(codefile,
|
||||
"{\n"
|
||||
"int enumint = *%s;\n", name);
|
||||
length_primitive ("integer", "&enumint", variable);
|
||||
fprintf(codefile, "}\n");
|
||||
} else if (t->range == NULL) {
|
||||
length_primitive ("heim_integer", name, variable);
|
||||
} else if (t->range->min == INT_MIN && t->range->max == INT_MAX) {
|
||||
|
Reference in New Issue
Block a user