commit 25724ab6eacd8fbd40a60cad41920e8d56af27a6 from: Benjamin Stürz date: Wed Jul 31 09:06:38 2024 UTC fix gen commit - e4e259d8732eb42b6c899c6a06e990f866d9152b commit + 25724ab6eacd8fbd40a60cad41920e8d56af27a6 blob - 2f0d48e892f5b82bdd063b39c87703ce616ab898 blob + 19767779cbb2857cdf246fc2af19b48b224b477d --- gen.c +++ gen.c @@ -42,6 +42,8 @@ size_t size_of (struct type *ty) return size_of_struct (ty->st); case T_UNION: return size_of_union (ty->un); + default: + abort (); } } @@ -91,6 +93,8 @@ size_t align_of (struct type *ty) return align_of_struct (ty->st); case T_UNION: return align_of_union (ty->un); + default: + abort (); } } @@ -395,7 +399,6 @@ void print_decode (FILE *out, struct structure *st) for (struct item **i = st->items; *i != NULL; ++i) { struct item *it = *i; - size_t sz = size_of (it->type); char *into; asprintf (&into, "out->%s", it->name); @@ -420,7 +423,7 @@ void include_guard (char *path) { char *s; - s = strrchr (s, '/'); + s = strrchr (path, '/'); if (s != NULL) { ++s; } else {