widl: Ignore pointer attributes applied to interface pointers.
Print a warning if a pointer attribute is specified since the generated code won't do what the developer expects.
This commit is contained in:
parent
cee15b2449
commit
a93f531c21
@ -1446,7 +1446,12 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl,
|
|||||||
}
|
}
|
||||||
if (ptr && is_ptr(ptr) && (ptr_attr || top))
|
if (ptr && is_ptr(ptr) && (ptr_attr || top))
|
||||||
{
|
{
|
||||||
if (!ptr_attr)
|
if (ptr_attr && ptr_attr != RPC_FC_UP &&
|
||||||
|
type_get_type(type_pointer_get_ref(ptr)) == TYPE_INTERFACE)
|
||||||
|
warning_loc_info(&v->loc_info,
|
||||||
|
"%s: pointer attribute applied to interface "
|
||||||
|
"pointer type has no effect\n", v->name);
|
||||||
|
if (top)
|
||||||
ptr_attr = RPC_FC_RP;
|
ptr_attr = RPC_FC_RP;
|
||||||
if (ptr_attr != (*pt)->type)
|
if (ptr_attr != (*pt)->type)
|
||||||
{
|
{
|
||||||
|
@ -158,7 +158,6 @@ int cant_be_null(const var_t *v)
|
|||||||
case TGT_ARRAY:
|
case TGT_ARRAY:
|
||||||
/* FIXME: work out pointer type */
|
/* FIXME: work out pointer type */
|
||||||
return 0;
|
return 0;
|
||||||
case TGT_IFACE_POINTER: /* FIXME */
|
|
||||||
case TGT_POINTER:
|
case TGT_POINTER:
|
||||||
return (get_pointer_fc(v->type) == RPC_FC_RP);
|
return (get_pointer_fc(v->type) == RPC_FC_RP);
|
||||||
case TGT_CTXT_HANDLE_POINTER:
|
case TGT_CTXT_HANDLE_POINTER:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user