Commit dc69d1c1 authored by Nils Goroll's avatar Nils Goroll

make vmodtool reject arguments of type VOID

VOID is only valid as a return type. If VOID was used as an argument,
the C compiler would bail out, yet we should better check this early.

Looking through CTYPES, VOID seems to be the only type not valid for
arguments, thus the explicit check.
parent 25f38bd5
......@@ -359,6 +359,8 @@ class ProtoType(object):
self.argstruct = True
else:
t = arg(wl, names, st.vcc.enums, ',')
if t.vt == 'VOID':
err("arguments can not be of type '%s'" % t.vt, warn=False)
if t.nm is None:
t.nm2 = "arg%d" % n
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment