scanf({"%c","%lc"}) requieres a pointer to {char,wchar_t}, not {int,wint_t}.
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 8 Jul 2011 11:43:29 +0000 (13:43 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 8 Jul 2011 11:48:02 +0000 (13:48 +0200)
format_check.c

index 9e991d8..39d2334 100644 (file)
@@ -764,8 +764,8 @@ static void check_scanf_format(const call_argument_t *arg,
                case 'c':
                        expected_type = type_int;
                        switch (fmt_mod) {
-                       case FMT_MOD_NONE: expected_type = type_int;     break; /* TODO promoted char */
-                       case FMT_MOD_l:    expected_type = type_wint_t;  break;
+                       case FMT_MOD_NONE: expected_type = type_char;    break;
+                       case FMT_MOD_l:    expected_type = type_wchar_t; break;
                        case FMT_MOD_w:    expected_type = type_wchar_t; break;
 
                        default: