Module: wine Branch: refs/heads/master Commit: 59830d69b4429b3e7a4f5941dd96114fd51fa407 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=59830d69b4429b3e7a4f5941...
Author: Robert Shearman rob@codeweavers.com Date: Tue Feb 7 16:25:10 2006 +0100
widl: Fix some warnings caused by making attributes const.
---
tools/widl/write_msft.c | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 219e9c2..ac67500 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1169,7 +1169,7 @@ static HRESULT add_func_desc(msft_typein int num_params = 0, num_defaults = 0; var_t *arg, *last_arg = NULL; char *namedata; - attr_t *attr; + const attr_t *attr; unsigned int funcflags = 0, callconv = 4 /* CC_STDCALL */; unsigned int funckind, invokekind = 1 /* INVOKE_FUNC */; int help_context = 0, help_string_context = 0, help_string_offset = -1; @@ -1350,7 +1350,7 @@ static HRESULT add_func_desc(msft_typein }
for (arg = last_arg, i = 0; arg; arg = PREV_LINK(arg), i++) { - attr_t *attr; + const attr_t *attr; int paramflags = 0; int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) + i * 3; int *defaultdata = num_defaults ? typedata + 6 + extra_attr + i : NULL; @@ -1476,7 +1476,7 @@ static HRESULT add_var_desc(msft_typeinf int var_type_size, var_kind = 0 /* VAR_PERINSTANCE */; int alignment; int varflags = 0; - attr_t *attr; + const attr_t *attr; char *namedata; int var_num = (typeinfo->typeinfo->cElement >> 16) & 0xffff;
@@ -1637,7 +1637,7 @@ static HRESULT add_impl_type(msft_typein }
static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_kind kind, - const char *name, attr_t *attr, int idx) + const char *name, const attr_t *attr, int idx) { msft_typeinfo_t *msft_typeinfo; int nameoffset; @@ -1823,7 +1823,7 @@ static void add_interface_typeinfo(msft_ type_t *ref; msft_typeinfo_t *msft_typeinfo; int num_parents = 0, num_funcs = 0; - attr_t *attr; + const attr_t *attr;
for(attr = interface->attrs; attr; attr = NEXT_LINK(attr)) if(attr->type == ATTR_DISPINTERFACE) @@ -1848,7 +1848,7 @@ static void add_interface_typeinfo(msft_ for(ref = interface->ref; ref; ref = ref->ref) { num_parents++; for(func = ref->funcs; func; func = NEXT_LINK(func)) { - attr_t *attr; + const attr_t *attr; for(attr = func->def->attrs; attr; attr = NEXT_LINK(attr)) if(attr->type == ATTR_LOCAL) break; @@ -1911,7 +1911,7 @@ static void add_typedef_typeinfo(msft_ty { msft_typeinfo_t *msft_typeinfo; int alignment; - attr_t *attrs; + const attr_t *attrs;
tdef->type->typelib_idx = typelib->typelib_header.nrtypeinfos; msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ALIAS, tdef->name, tdef->type->attrs, @@ -1931,7 +1931,7 @@ static void add_coclass_typeinfo(msft_ty int num_ifaces = 0, offset, i; MSFT_RefRecord *ref, *first = NULL, *first_source = NULL; int have_default = 0, have_default_source = 0; - attr_t *attr; + const attr_t *attr;
msft_typeinfo = create_msft_typeinfo(typelib, TKIND_COCLASS, cls->name, cls->attrs, typelib->typelib_header.nrtypeinfos); @@ -2072,7 +2072,7 @@ static void set_name(msft_typelib_t *typ static void set_version(msft_typelib_t *typelib) { long version = MAKELONG(0,0); - attr_t *attr; + const attr_t *attr;
for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) { if(attr->type == ATTR_VERSION) { @@ -2087,7 +2087,7 @@ static void set_guid(msft_typelib_t *typ { MSFT_GuidEntry guidentry; int offset; - attr_t *attr; + const attr_t *attr; GUID guid = {0,0,0,{0,0,0,0,0,0}};
guidentry.guid = guid; @@ -2111,7 +2111,7 @@ static void set_guid(msft_typelib_t *typ
static void set_doc_string(msft_typelib_t *typelib) { - attr_t *attr; + const attr_t *attr; int offset;
for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) { @@ -2127,7 +2127,7 @@ static void set_doc_string(msft_typelib_ static void set_help_file_name(msft_typelib_t *typelib) { int offset; - attr_t *attr; + const attr_t *attr; for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) { if(attr->type == ATTR_HELPFILE) { offset = ctl2_alloc_string(typelib, attr->u.pval); @@ -2141,10 +2141,10 @@ static void set_help_file_name(msft_type
static void set_help_context(msft_typelib_t *typelib) { - attr_t *attr; + const attr_t *attr; for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) { if(attr->type == ATTR_HELPCONTEXT) { - expr_t *expr = (expr_t *)attr->u.pval; + const expr_t *expr = (expr_t *)attr->u.pval; typelib->typelib_header.helpcontext = expr->cval; } } @@ -2154,7 +2154,7 @@ static void set_help_context(msft_typeli static void set_help_string_dll(msft_typelib_t *typelib) { int offset; - attr_t *attr; + const attr_t *attr; for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) { if(attr->type == ATTR_HELPSTRINGDLL) { offset = ctl2_alloc_string(typelib, attr->u.pval); @@ -2168,10 +2168,10 @@ static void set_help_string_dll(msft_typ
static void set_help_string_context(msft_typelib_t *typelib) { - attr_t *attr; + const attr_t *attr; for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) { if(attr->type == ATTR_HELPSTRINGCONTEXT) { - expr_t *expr = (expr_t *)attr->u.pval; + const expr_t *expr = (expr_t *)attr->u.pval; typelib->typelib_header.helpstringcontext = expr->cval; } } @@ -2186,7 +2186,7 @@ static void set_lcid(msft_typelib_t *typ
static void set_lib_flags(msft_typelib_t *typelib) { - attr_t *attr; + const attr_t *attr;
typelib->typelib_header.flags = 0; for(attr = typelib->typelib->attrs; attr; attr = NEXT_LINK(attr)) {