projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- add missing initialization of have_const_functions
[cparser]
/
format_check.c
diff --git
a/format_check.c
b/format_check.c
index
d5ea272
..
d666d1a
100644
(file)
--- a/
format_check.c
+++ b/
format_check.c
@@
-247,6
+247,7
@@
break_fmt_flags:
/* minimum field width */
if (fmt == '*') {
/* minimum field width */
if (fmt == '*') {
+ fmt = vchar.next(&vchar);
if (arg == NULL) {
warningf(pos, "missing argument for '*' field width in conversion specification");
return;
if (arg == NULL) {
warningf(pos, "missing argument for '*' field width in conversion specification");
return;
@@
-267,6
+268,7
@@
break_fmt_flags:
if (fmt == '.') {
fmt = vchar.next(&vchar);
if (fmt == '*') {
if (fmt == '.') {
fmt = vchar.next(&vchar);
if (fmt == '*') {
+ fmt = vchar.next(&vchar);
if (arg == NULL) {
warningf(pos, "missing argument for '*' precision in conversion specification");
return;
if (arg == NULL) {
warningf(pos, "missing argument for '*' precision in conversion specification");
return;
@@
-356,7
+358,7
@@
break_fmt_flags:
break;
}
break;
}
-
const type_t
*expected_type;
+
type_t
*expected_type;
type_qualifiers_t expected_qual = TYPE_QUALIFIER_NONE;
format_flags_t allowed_flags;
switch (fmt) {
type_qualifiers_t expected_qual = TYPE_QUALIFIER_NONE;
format_flags_t allowed_flags;
switch (fmt) {
@@
-521,11
+523,12
@@
eval_fmt_mod_unsigned:
}
{ /* create a scope here to prevent warning about the jump to next_arg */
}
{ /* create a scope here to prevent warning about the jump to next_arg */
- type_t *const arg_type = arg->expression->base.type;
- if (is_type_pointer(expected_type)) {
+ type_t *const arg_type = arg->expression->base.type;
+ type_t *const expected_type_skip = skip_typeref(expected_type);
+ if (is_type_pointer(expected_type_skip)) {
type_t *const arg_skip = skip_typeref(arg_type);
if (is_type_pointer(arg_skip)) {
type_t *const arg_skip = skip_typeref(arg_type);
if (is_type_pointer(arg_skip)) {
- type_t *const exp_to = skip_typeref(expected_type->pointer.points_to);
+ type_t *const exp_to = skip_typeref(expected_type
_skip
->pointer.points_to);
type_t *const arg_to = skip_typeref(arg_skip->pointer.points_to);
if ((arg_to->base.qualifiers & ~expected_qual) == 0 &&
get_unqualified_type(arg_to) == exp_to) {
type_t *const arg_to = skip_typeref(arg_skip->pointer.points_to);
if ((arg_to->base.qualifiers & ~expected_qual) == 0 &&
get_unqualified_type(arg_to) == exp_to) {
@@
-533,7
+536,7
@@
eval_fmt_mod_unsigned:
}
}
} else {
}
}
} else {
- if (get_unqualified_type(skip_typeref(arg_type)) == expected_type) {
+ if (get_unqualified_type(skip_typeref(arg_type)) == expected_type
_skip
) {
goto next_arg;
}
}
goto next_arg;
}
}