mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
widl: Print all NdrFcShort parameters as shorts to avoid warnings for negative values.
This commit is contained in:
parent
fcc096083f
commit
25624b677d
1 changed files with 32 additions and 32 deletions
|
@ -713,7 +713,7 @@ static unsigned int write_procformatstring_type(FILE *file, int indent,
|
||||||
print_file(file, indent, "0x4d, /* FC_IN_PARAM */\n");
|
print_file(file, indent, "0x4d, /* FC_IN_PARAM */\n");
|
||||||
|
|
||||||
print_file(file, indent, "0x01,\n");
|
print_file(file, indent, "0x01,\n");
|
||||||
print_file(file, indent, "NdrFcShort(0x%x),\n", type->typestring_offset);
|
print_file(file, indent, "NdrFcShort(0x%hx),\n", type->typestring_offset);
|
||||||
size = 4; /* includes param type prefix */
|
size = 4; /* includes param type prefix */
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
|
@ -826,7 +826,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||||
print_file(file, 2, "0x%x, /* Corr desc: constant, val = %ld */\n",
|
print_file(file, 2, "0x%x, /* Corr desc: constant, val = %ld */\n",
|
||||||
RPC_FC_CONSTANT_CONFORMANCE, expr->cval);
|
RPC_FC_CONSTANT_CONFORMANCE, expr->cval);
|
||||||
print_file(file, 2, "0x%lx,\n", expr->cval >> 16);
|
print_file(file, 2, "0x%lx,\n", expr->cval >> 16);
|
||||||
print_file(file, 2, "NdrFcShort(0x%lx),\n", expr->cval & USHRT_MAX);
|
print_file(file, 2, "NdrFcShort(0x%hx),\n", (unsigned short)expr->cval);
|
||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
@ -943,7 +943,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||||
print_file(file, 2, "0x%x, /* Corr desc: %s%s */\n",
|
print_file(file, 2, "0x%x, /* Corr desc: %s%s */\n",
|
||||||
conftype | param_type, conftype_string, string_of_type(param_type));
|
conftype | param_type, conftype_string, string_of_type(param_type));
|
||||||
print_file(file, 2, "0x%x, /* %s */\n", operator_type, operator_string);
|
print_file(file, 2, "0x%x, /* %s */\n", operator_type, operator_string);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* offset = %d */\n",
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* offset = %d */\n",
|
||||||
offset, offset);
|
offset, offset);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -977,7 +977,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
|
||||||
|
|
||||||
print_file(file, 2, "0x%x, /* Corr desc: %s */\n", conftype, conftype_string);
|
print_file(file, 2, "0x%x, /* Corr desc: %s */\n", conftype, conftype_string);
|
||||||
print_file(file, 2, "0x%x, /* %s */\n", RPC_FC_CALLBACK, "FC_CALLBACK");
|
print_file(file, 2, "0x%x, /* %s */\n", RPC_FC_CALLBACK, "FC_CALLBACK");
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* %u */\n", callback_offset, callback_offset);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", callback_offset, callback_offset);
|
||||||
}
|
}
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
@ -1264,8 +1264,8 @@ static void write_user_tfs(FILE *file, type_t *type, unsigned int *tfsoff)
|
||||||
print_file(file, 2, "0x%x,\t/* Alignment= %d, Flags= %02x */\n",
|
print_file(file, 2, "0x%x,\t/* Alignment= %d, Flags= %02x */\n",
|
||||||
flags | (align - 1), align - 1, flags);
|
flags | (align - 1), align - 1, flags);
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Function offset= %hu */\n", funoff, funoff);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Function offset= %hu */\n", funoff, funoff);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %u */\n", size, size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", size, size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %u */\n", usize, usize);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", usize, usize);
|
||||||
*tfsoff += 8;
|
*tfsoff += 8;
|
||||||
reloff = absoff - *tfsoff;
|
reloff = absoff - *tfsoff;
|
||||||
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff);
|
||||||
|
@ -1382,8 +1382,8 @@ static int write_no_repeat_pointer_descriptions(
|
||||||
print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD);
|
print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD);
|
||||||
|
|
||||||
/* pointer instance */
|
/* pointer instance */
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Memory offset = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", *offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Buffer offset = %d */\n", *offset_in_buffer, *offset_in_buffer);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", *offset_in_buffer, *offset_in_buffer);
|
||||||
*typestring_offset += 6;
|
*typestring_offset += 6;
|
||||||
|
|
||||||
if (is_ptr(type))
|
if (is_ptr(type))
|
||||||
|
@ -1463,8 +1463,8 @@ static int write_pointer_description_offsets(
|
||||||
|
|
||||||
/* pointer instance */
|
/* pointer instance */
|
||||||
/* FIXME: sometimes from end of structure, sometimes from beginning */
|
/* FIXME: sometimes from end of structure, sometimes from beginning */
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Memory offset = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", *offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Buffer offset = %d */\n", *offset_in_buffer, *offset_in_buffer);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", *offset_in_buffer, *offset_in_buffer);
|
||||||
|
|
||||||
align = 0;
|
align = 0;
|
||||||
memsize = type_memsize(type, &align);
|
memsize = type_memsize(type, &align);
|
||||||
|
@ -1558,10 +1558,10 @@ static int write_fixed_array_pointer_descriptions(
|
||||||
|
|
||||||
print_file(file, 2, "0x%02x, /* FC_FIXED_REPEAT */\n", RPC_FC_FIXED_REPEAT);
|
print_file(file, 2, "0x%02x, /* FC_FIXED_REPEAT */\n", RPC_FC_FIXED_REPEAT);
|
||||||
print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD);
|
print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Iterations = %d */\n", type_array_get_dim(type), type_array_get_dim(type));
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Iterations = %d */\n", type_array_get_dim(type), type_array_get_dim(type));
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Increment = %d */\n", increment_size, increment_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", increment_size, increment_size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Offset to array = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", *offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Number of pointers = %d */\n", pointer_count, pointer_count);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", pointer_count, pointer_count);
|
||||||
*typestring_offset += 10;
|
*typestring_offset += 10;
|
||||||
|
|
||||||
pointer_count = write_pointer_description_offsets(
|
pointer_count = write_pointer_description_offsets(
|
||||||
|
@ -1635,9 +1635,9 @@ static int write_conformant_array_pointer_descriptions(
|
||||||
|
|
||||||
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
||||||
print_file(file, 2, "0x%02x, /* FC_FIXED_OFFSET */\n", RPC_FC_FIXED_OFFSET);
|
print_file(file, 2, "0x%02x, /* FC_FIXED_OFFSET */\n", RPC_FC_FIXED_OFFSET);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Increment = %d */\n", increment_size, increment_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", increment_size, increment_size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Offset to array = %d */\n", offset_in_memory, offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", offset_in_memory, offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Number of pointers = %d */\n", pointer_count, pointer_count);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", pointer_count, pointer_count);
|
||||||
*typestring_offset += 8;
|
*typestring_offset += 8;
|
||||||
|
|
||||||
pointer_count = write_pointer_description_offsets(
|
pointer_count = write_pointer_description_offsets(
|
||||||
|
@ -1679,9 +1679,9 @@ static int write_varying_array_pointer_descriptions(
|
||||||
|
|
||||||
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT);
|
||||||
print_file(file, 2, "0x%02x, /* FC_VARIABLE_OFFSET */\n", RPC_FC_VARIABLE_OFFSET);
|
print_file(file, 2, "0x%02x, /* FC_VARIABLE_OFFSET */\n", RPC_FC_VARIABLE_OFFSET);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Increment = %d */\n", increment_size, increment_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", increment_size, increment_size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Offset to array = %d */\n", *offset_in_memory, *offset_in_memory);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", *offset_in_memory, *offset_in_memory);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* Number of pointers = %d */\n", pointer_count, pointer_count);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", pointer_count, pointer_count);
|
||||||
*typestring_offset += 8;
|
*typestring_offset += 8;
|
||||||
|
|
||||||
pointer_count = write_pointer_description_offsets(
|
pointer_count = write_pointer_description_offsets(
|
||||||
|
@ -1840,7 +1840,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs,
|
||||||
print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD);
|
print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%x), /* %d */\n", dim, dim);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", dim, dim);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
|
|
||||||
return start_offset;
|
return start_offset;
|
||||||
|
@ -1923,7 +1923,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %u */\n", size, size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", size, size);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1945,11 +1945,11 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %u */\n", dim, dim);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", dim, dim);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %u */\n", elsize, elsize);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", elsize, elsize);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1974,7 +1974,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int dim = size_is ? 0 : type_array_get_dim(type);
|
unsigned int dim = size_is ? 0 : type_array_get_dim(type);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %u */\n", dim, dim);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", dim, dim);
|
||||||
*typestring_offset += 2;
|
*typestring_offset += 2;
|
||||||
*typestring_offset
|
*typestring_offset
|
||||||
+= write_conf_or_var_desc(file, current_structure, baseoff,
|
+= write_conf_or_var_desc(file, current_structure, baseoff,
|
||||||
|
@ -2109,7 +2109,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type,
|
||||||
print_start_tfs_comment(file, type, start_offset);
|
print_start_tfs_comment(file, type, start_offset);
|
||||||
print_file(file, 2, "0x%x,\t/* %s */\n", real_type, string_of_type(real_type));
|
print_file(file, 2, "0x%x,\t/* %s */\n", real_type, string_of_type(real_type));
|
||||||
print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1);
|
print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %d */\n", total_size, total_size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", total_size, total_size);
|
||||||
*tfsoff += 4;
|
*tfsoff += 4;
|
||||||
|
|
||||||
if (array)
|
if (array)
|
||||||
|
@ -2134,7 +2134,7 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type,
|
||||||
unsigned int absoff = type->ptrdesc ? type->ptrdesc : *tfsoff;
|
unsigned int absoff = type->ptrdesc ? type->ptrdesc : *tfsoff;
|
||||||
int reloff = absoff - *tfsoff;
|
int reloff = absoff - *tfsoff;
|
||||||
assert( reloff >= 0 );
|
assert( reloff >= 0 );
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* Offset= %d (%u) */\n",
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %d (%u) */\n",
|
||||||
reloff, reloff, absoff);
|
reloff, reloff, absoff);
|
||||||
*tfsoff += 2;
|
*tfsoff += 2;
|
||||||
}
|
}
|
||||||
|
@ -2219,7 +2219,7 @@ static unsigned int write_pointer_only_tfs(FILE *file, const attr_list_t *attrs,
|
||||||
fprintf(file, " */\n");
|
fprintf(file, " */\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %d */\n", reloff, offset);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", reloff, offset);
|
||||||
*typeformat_offset += 4;
|
*typeformat_offset += 4;
|
||||||
|
|
||||||
return start_offset;
|
return start_offset;
|
||||||
|
@ -2239,7 +2239,7 @@ static void write_branch_type(FILE *file, const type_t *t, unsigned int *tfsoff)
|
||||||
else if (t->typestring_offset)
|
else if (t->typestring_offset)
|
||||||
{
|
{
|
||||||
short reloff = t->typestring_offset - *tfsoff;
|
short reloff = t->typestring_offset - *tfsoff;
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* Offset= %d (%d) */\n",
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %d (%d) */\n",
|
||||||
reloff, reloff, t->typestring_offset);
|
reloff, reloff, t->typestring_offset);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2330,8 +2330,8 @@ static unsigned int write_union_tfs(FILE *file, type_t *type, unsigned int *tfso
|
||||||
*tfsoff += 2;
|
*tfsoff += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %d */\n", size, size);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", size, size);
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\t/* %d */\n", nbranch, nbranch);
|
print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", nbranch, nbranch);
|
||||||
*tfsoff += 4;
|
*tfsoff += 4;
|
||||||
|
|
||||||
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
|
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
|
||||||
|
@ -2370,7 +2370,7 @@ static unsigned int write_union_tfs(FILE *file, type_t *type, unsigned int *tfso
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_file(file, 2, "NdrFcShort(0x%x),\n", nodeftype);
|
print_file(file, 2, "NdrFcShort(0x%hx),\n", nodeftype);
|
||||||
*tfsoff += 2;
|
*tfsoff += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue