Commit a93f531c authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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.
parent cee15b24
......@@ -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_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;
if (ptr_attr != (*pt)->type)
{
......
......@@ -158,7 +158,6 @@ int cant_be_null(const var_t *v)
case TGT_ARRAY:
/* FIXME: work out pointer type */
return 0;
case TGT_IFACE_POINTER: /* FIXME */
case TGT_POINTER:
return (get_pointer_fc(v->type) == RPC_FC_RP);
case TGT_CTXT_HANDLE_POINTER:
......
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