diff --git a/src/plugins/variadic/classify.ml b/src/plugins/variadic/classify.ml index f2fd26fac784cc6ed0341290b6319f28852bdf16..1a183c1826e6bc76dba798b1ab13efb150f63db1 100644 --- a/src/plugins/variadic/classify.ml +++ b/src/plugins/variadic/classify.ml @@ -35,7 +35,7 @@ let find_function env s = try Some (Environment.find_function env s) with Not_found -> - Self.warning + Self.warning ~wkey:wkey_libc_framac "Unable to locate function %s which should be in the Frama-C LibC." s; None @@ -56,7 +56,7 @@ let mk_aggregator env fun_name a_pos pname a_type = (* Check that pos is a valid position in the list *) assert (a_pos >= 0); if a_pos >= List.length params then begin - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_libc "The standard function %s should have at least %d parameters." fun_name (a_pos + 1); @@ -69,7 +69,7 @@ let mk_aggregator env fun_name a_pos pname a_type = | TArray (typ,_,_) | TPtr (typ, _) -> typ | _ -> - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_libc "The parameter %d of standard function %s should be \ of array type." (a_pos + 1) @@ -93,7 +93,7 @@ let mk_format_fun vi f_kind f_buffer ~format_pos = and n_actual_args = List.length (Typ.params vi.vtype) in if n_actual_args < n_expected_args then begin - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_libc "The standard function %s was expected to have at least %d fixed \ parameters but only has %d.@ \ No variadic translation will be performed." diff --git a/src/plugins/variadic/format_parser.ml b/src/plugins/variadic/format_parser.ml index eba2d018d3d56f4eb9b63bda8121a2c519e1e4dd..1fb3bee4d63f738598610414a7d24faa280e4b4f 100644 --- a/src/plugins/variadic/format_parser.ml +++ b/src/plugins/variadic/format_parser.ml @@ -26,7 +26,7 @@ open Format_pprint exception Invalid_format -let warn f = Options.Self.warning ~current:true f +let warn f = Options.Self.warning ~current:true ~wkey:Options.wkey_format f (* ************************************************************************ *) (* printf format verification *) diff --git a/src/plugins/variadic/generic.ml b/src/plugins/variadic/generic.ml index 56d847f4a86e13057df7f47a00081119cc6bf812..7361c6011a5d66cc08b911206abc7db280cd7457 100644 --- a/src/plugins/variadic/generic.ml +++ b/src/plugins/variadic/generic.ml @@ -109,7 +109,7 @@ let translate_va_builtin caller inst = if Cil.isIntegralType ty then begin let promoted_type = Cil.integralPromotion ty in if promoted_type <> ty then - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "Wrong type argument in va_start: %a is promoted to %a when used \ in the variadic part of the arguments. (You should pass %a to \ va_start)" diff --git a/src/plugins/variadic/options.ml b/src/plugins/variadic/options.ml index 9aef64f8ad3fd374a97f6ca8922009d5f45eda12..1a0d8c7c49d81bbf19e7172422986a31cebf3e3f 100644 --- a/src/plugins/variadic/options.ml +++ b/src/plugins/variadic/options.ml @@ -42,3 +42,9 @@ module Strict = Self.True distinct integral types which have the same size and \ signedness" end) + +let wkey_libc = Self.register_warn_category "libc" +let wkey_format = Self.register_warn_category "libc:format" +let wkey_libc_framac = Self.register_warn_category "libc:frama-c" +let wkey_prototype = Self.register_warn_category "prototype" +let wkey_typing = Self.register_warn_category "typing" diff --git a/src/plugins/variadic/options.mli b/src/plugins/variadic/options.mli index d5d963658af1415da29669d0096db47a0b8006db..10d98f1e66837e9cc4046bf5c63162de55c7ffad 100644 --- a/src/plugins/variadic/options.mli +++ b/src/plugins/variadic/options.mli @@ -23,3 +23,9 @@ module Self : Plugin.General_services module Enabled : Parameter_sig.Bool module Strict : Parameter_sig.Bool + +val wkey_format: Self.warn_category +val wkey_libc: Self.warn_category +val wkey_libc_framac: Self.warn_category +val wkey_prototype: Self.warn_category +val wkey_typing: Self.warn_category diff --git a/src/plugins/variadic/standard.ml b/src/plugins/variadic/standard.ml index 9e927870b2a0d3cfb34ee59fd980823934618ba4..facd3afef6da78c393fcd8a2a8ac9ec1e5ba325f 100644 --- a/src/plugins/variadic/standard.ml +++ b/src/plugins/variadic/standard.ml @@ -131,12 +131,12 @@ let cast_arg i paramtyp exp = | Strict | Tolerated -> () | (NonPortable | NonStrict) when not (Strict.get ()) -> () | NonPortable -> - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "Possible portability issues with enum type for argument %d \ (use -variadic-no-strict to avoid this warning)." (i + 1) | NonStrict | Never -> - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "Incorrect type for argument %d. \ The argument will be cast from %a to %a." (i + 1) @@ -151,12 +151,12 @@ let match_args ~callee tparams args = let paramcount = List.length tparams and argcount = List.length args in if argcount > paramcount then - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "Too many arguments: expected %d, given %d. \ Superfluous arguments will be removed." paramcount argcount else if argcount < paramcount then ( - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "Not enough arguments: expected %d, given %d." paramcount argcount; raise (Translate_call_exn callee) @@ -255,7 +255,7 @@ let aggregator_call ~fundec ~ghost aggregator scope loc mk_call vf args = let argcount = List.length args and paramcount = List.length tparams in if argcount < paramcount then begin - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "Not enough arguments: expected %d, given %d." paramcount argcount; raise (Translate_call_exn vf.vf_decl); @@ -345,7 +345,7 @@ let overloaded_call ~fundec overload block loc mk_call vf args = let tparams, new_callee = match filter_matching_prototypes overload args with | [] -> (* No matching prototype *) - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_prototype "@[No matching prototype found for this call to %s.@.\ Expected candidates:@.\ @[<v> %a@]@.\ @@ -357,7 +357,7 @@ let overloaded_call ~fundec overload block loc mk_call vf args = | [(tparams,vi)] -> (* Exactly one matching prototype *) tparams, vi | l -> (* Several matching prototypes *) - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_prototype "Ambiguous call to %s. Matching candidates are: \ %a" name @@ -392,7 +392,7 @@ let find_global env name = try Some (Environment.find_global env name) with Not_found -> - Self.warning ~once:true + Self.warning ~once:true ~wkey:wkey_libc_framac "Unable to locate global %s which should be in the Frama-C LibC. \ Correct specifications can't be generated." name; @@ -402,7 +402,7 @@ let find_predicate name = match Logic_env.find_all_logic_functions name with | f :: _q -> f (* TODO: should we warn in case of overloading? *) | [] -> - Self.warning ~once:true + Self.warning ~once:true ~wkey:wkey_libc_framac "Unable to locate ACSL predicate %s which should be in the Frama-C LibC. \ Correct specifications can't be generated." name; @@ -428,7 +428,7 @@ let find_predicate_by_width typ narrow_name wide_name = Cil.theMachine.Cil.wcharType -> find_predicate wide_name | _ -> - Self.warning ~current:true + Self.warning ~current:true ~wkey:wkey_typing "expected single/wide character pointer type, got %a (%a, unrolled %a)" Printer.pp_typ typ Cil_types_debug.pp_typ typ Cil_types_debug.pp_typ (Cil.unrollTypeDeep typ); raise Not_found @@ -705,7 +705,7 @@ let infer_format_from_args vf format_fun args = | ScanfLike -> if not (Cil.isPointerType t) then begin let source = fst arg.eloc in - Self.warning ~source + Self.warning ~source ~wkey:wkey_typing "Expecting pointer as parameter of scanf function. \ Argument %a has type %a" Printer.pp_exp arg Printer.pp_typ t; diff --git a/src/plugins/variadic/tests/declared/oracle/redefine_anonymous_parameters.res.oracle b/src/plugins/variadic/tests/declared/oracle/redefine_anonymous_parameters.res.oracle index a3ae37824e70ec189082e1368363eb76d20f02ed..5f6d9b83b39ca3b27a73673886aca4144df0820e 100644 --- a/src/plugins/variadic/tests/declared/oracle/redefine_anonymous_parameters.res.oracle +++ b/src/plugins/variadic/tests/declared/oracle/redefine_anonymous_parameters.res.oracle @@ -1,7 +1,9 @@ [variadic] redefine_anonymous_parameters.i:1: Declaration of variadic function printf. -[variadic] Warning: Unable to locate ACSL predicate valid_read_string which should be in the Frama-C LibC. Correct specifications can't be generated. -[variadic] Warning: Unable to locate global __fc_stdout which should be in the Frama-C LibC. Correct specifications can't be generated. +[variadic:libc:frama-c] Warning: + Unable to locate ACSL predicate valid_read_string which should be in the Frama-C LibC. Correct specifications can't be generated. +[variadic:libc:frama-c] Warning: + Unable to locate global __fc_stdout which should be in the Frama-C LibC. Correct specifications can't be generated. [variadic] redefine_anonymous_parameters.i:4: Translating call to printf to a call to the specialized version printf_va_1. [eva] Analyzing a complete application starting at main diff --git a/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle index 0bf7155503813b37a2b28e08e6bd1d05a6360b7d..085bd49daedba21356626eea68d343d1c78c6d25 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/exec.res.oracle @@ -4,16 +4,16 @@ Declaration of variadic function execle. [variadic] FRAMAC_SHARE/libc/unistd.h:810: Declaration of variadic function execlp. -[variadic] exec.c:5: Warning: +[variadic:typing] exec.c:5: Warning: Incorrect type for argument 3. The argument will be cast from int to char *. [variadic] exec.c:5: Translating call to execl to a call to execv. [variadic] exec.c:7: Warning: Failed to find a sentinel (NULL pointer) in the argument list. [variadic] exec.c:7: Fallback translation of call execlp to a call to the specialized version execlp_fallback_1. -[variadic] exec.c:9: Warning: Not enough arguments: expected 5, given 4. +[variadic:typing] exec.c:9: Warning: Not enough arguments: expected 5, given 4. [variadic] exec.c:9: Fallback translation of call execle to a call to the specialized version execle_fallback_1. -[variadic] exec.c:11: Warning: +[variadic:typing] exec.c:11: Warning: Incorrect type for argument 5. The argument will be cast from int to char * const *. [variadic] exec.c:11: Translating call to execle to a call to execve. diff --git a/src/plugins/variadic/tests/erroneous/oracle/invalid_libc.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/invalid_libc.res.oracle index c830fa3b1f625ba9217e8984e852683ba2e6bc94..e0a425d9a522742865dbbcf435854912b0400b32 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/invalid_libc.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/invalid_libc.res.oracle @@ -1,5 +1,5 @@ [variadic] invalid_libc.i:2: Declaration of variadic function fprintf. -[variadic] invalid_libc.i:2: Warning: +[variadic:libc] invalid_libc.i:2: Warning: The standard function fprintf was expected to have at least 2 fixed parameters but only has 1. No variadic translation will be performed. [variadic] invalid_libc.i:6: Generic translation of call to variadic function. diff --git a/src/plugins/variadic/tests/erroneous/oracle/no-libc.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/no-libc.res.oracle index 6f2256ced8458c2138a064fe059fd90219d985e2..3178a54947e82a2d3e3dc1824a867b3acd5b4ea7 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/no-libc.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/no-libc.res.oracle @@ -1,5 +1,7 @@ [variadic] no-libc.i:1: Declaration of variadic function printf. -[variadic] Warning: Unable to locate ACSL predicate valid_read_string which should be in the Frama-C LibC. Correct specifications can't be generated. -[variadic] Warning: Unable to locate global __fc_stdout which should be in the Frama-C LibC. Correct specifications can't be generated. +[variadic:libc:frama-c] Warning: + Unable to locate ACSL predicate valid_read_string which should be in the Frama-C LibC. Correct specifications can't be generated. +[variadic:libc:frama-c] Warning: + Unable to locate global __fc_stdout which should be in the Frama-C LibC. Correct specifications can't be generated. [variadic] no-libc.i:5: Translating call to printf to a call to the specialized version printf_va_1. diff --git a/src/plugins/variadic/tests/erroneous/oracle/printf.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/printf.res.oracle index b22f9025dba1794583d2b6b9793a200e1e4de061..38a9205c37681345f2ef4f597763ff0a18e63a62 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/printf.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/printf.res.oracle @@ -16,8 +16,8 @@ Declaration of variadic function dprintf. [variadic] FRAMAC_SHARE/libc/stdio.h:590: Declaration of variadic function asprintf. -[variadic] printf.c:8: Warning: Multiple usage of flag '-'. -[variadic] printf.c:8: Warning: +[variadic:libc:format] printf.c:8: Warning: Multiple usage of flag '-'. +[variadic:libc:format] printf.c:8: Warning: Flag ' ' and conversion specififer e are not compatibles. [variadic] printf.c:8: Fallback translation of call printf to a call to the specialized version printf_fallback_1. diff --git a/src/plugins/variadic/tests/erroneous/oracle/va_arg-wrongtype.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/va_arg-wrongtype.res.oracle index ff77e4725d8caba6826723de769b2d76696e7180..b51862515dfbc25c6f665c5c941b398d1c347736 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/va_arg-wrongtype.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/va_arg-wrongtype.res.oracle @@ -1,5 +1,5 @@ [variadic] va_arg-wrongtype.c:3: Declaration of variadic function sum. -[variadic] va_arg-wrongtype.c:9: Warning: +[variadic:typing] va_arg-wrongtype.c:9: Warning: Wrong type argument in va_start: short is promoted to int when used in the variadic part of the arguments. (You should pass int to va_start) [variadic] va_arg-wrongtype.c:18: Generic translation of call to variadic function. diff --git a/src/plugins/variadic/tests/known/oracle/exec.res.oracle b/src/plugins/variadic/tests/known/oracle/exec.res.oracle index 279def5dd329b2c2ec067de2d47ca86e07d0a7f4..d8d3c2140b9386b1b0c6a2afaf849ff544614822 100644 --- a/src/plugins/variadic/tests/known/oracle/exec.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/exec.res.oracle @@ -5,13 +5,13 @@ [variadic] FRAMAC_SHARE/libc/unistd.h:810: Declaration of variadic function execlp. [variadic] exec.c:9: Translating call to execle to a call to execve. -[variadic] exec.c:11: Warning: +[variadic:typing] exec.c:11: Warning: Too many arguments: expected 5, given 6. Superfluous arguments will be removed. [variadic] exec.c:11: Translating call to execl to a call to execv. -[variadic] exec.c:12: Warning: +[variadic:typing] exec.c:12: Warning: Too many arguments: expected 4, given 5. Superfluous arguments will be removed. [variadic] exec.c:12: Translating call to execlp to a call to execvp. -[variadic] exec.c:13: Warning: +[variadic:typing] exec.c:13: Warning: Too many arguments: expected 4, given 6. Superfluous arguments will be removed. [variadic] exec.c:13: Translating call to execle to a call to execve. [variadic] exec.c:15: Warning: diff --git a/src/plugins/variadic/tests/known/oracle/fcntl.res.oracle b/src/plugins/variadic/tests/known/oracle/fcntl.res.oracle index 79b0b40397ed7b28352584ca5ec8a13ee719d0a6..ff5a912894d02533eca168e09c1a0d527f8aa8ef 100644 --- a/src/plugins/variadic/tests/known/oracle/fcntl.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/fcntl.res.oracle @@ -9,7 +9,7 @@ Translating call to the specialized version fcntl(int, int, int). [variadic] fcntl.c:10: Translating call to the specialized version fcntl(int, int, struct flock *). -[variadic] fcntl.c:16: Warning: +[variadic:prototype] fcntl.c:16: Warning: No matching prototype found for this call to fcntl. Expected candidates: fcntl(int, int) @@ -23,7 +23,7 @@ Translating call to the specialized version fcntl(int, int). [variadic] fcntl.c:24: Translating call to the specialized version fcntl(int, int, struct flock *). -[variadic] fcntl.c:28: Warning: +[variadic:prototype] fcntl.c:28: Warning: No matching prototype found for this call to fcntl. Expected candidates: fcntl(int, int) diff --git a/src/plugins/variadic/tests/known/oracle/open.res.oracle b/src/plugins/variadic/tests/known/oracle/open.res.oracle index ff7c52d67ccbab097e52ec13f8fedcfe72369ff6..9b5c71ca58f9f5128de42393fbd4e864502a471e 100644 --- a/src/plugins/variadic/tests/known/oracle/open.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/open.res.oracle @@ -5,11 +5,11 @@ Declaration of variadic function openat. [variadic] open.c:7: Translating call to the specialized version open(char const *, int, mode_t). -[variadic] open.c:7: Warning: +[variadic:typing] open.c:7: Warning: Incorrect type for argument 3. The argument will be cast from int to mode_t. [variadic] open.c:8: Translating call to the specialized version open(char const *, int). -[variadic] open.c:9: Warning: +[variadic:prototype] open.c:9: Warning: No matching prototype found for this call to open. Expected candidates: open(char const *, int) diff --git a/src/plugins/variadic/tests/known/oracle/open_wrong.res.oracle b/src/plugins/variadic/tests/known/oracle/open_wrong.res.oracle index 45d5466519d6cf030ab1d1db40fa0f6daa0a3950..1f4b8a7cd11d50816dc9c19df5ed3ca045374332 100644 --- a/src/plugins/variadic/tests/known/oracle/open_wrong.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/open_wrong.res.oracle @@ -3,7 +3,7 @@ [variadic] FRAMAC_SHARE/libc/fcntl.h:124: Declaration of variadic function open. [variadic] FRAMAC_SHARE/libc/fcntl.h:131: Declaration of variadic function openat. -[variadic] open_wrong.c:13: Warning: +[variadic:prototype] open_wrong.c:13: Warning: No matching prototype found for this call to open. Expected candidates: open(char const *, int) diff --git a/src/plugins/variadic/tests/known/oracle/openat.res.oracle b/src/plugins/variadic/tests/known/oracle/openat.res.oracle index 9df27b194b91e66c4de695ee4451cdc078c7fde4..8773e0e6c29669613ecb4e1374358be7111482a7 100644 --- a/src/plugins/variadic/tests/known/oracle/openat.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/openat.res.oracle @@ -7,9 +7,9 @@ Translating call to the specialized version openat(int, char const *, int, mode_t). [variadic] openat.c:9: Translating call to the specialized version openat(int, char const *, int, mode_t). -[variadic] openat.c:9: Warning: +[variadic:typing] openat.c:9: Warning: Incorrect type for argument 4. The argument will be cast from int to mode_t. -[variadic] openat.c:10: Warning: +[variadic:prototype] openat.c:10: Warning: No matching prototype found for this call to openat. Expected candidates: openat(int, char const *, int) diff --git a/src/plugins/variadic/tests/known/oracle/printf.res.oracle b/src/plugins/variadic/tests/known/oracle/printf.res.oracle index a129b3b58e801edd9676cad89e9d9020598cc59e..995179fa65850170b1a1852836dd5c0a286b0c6a 100644 --- a/src/plugins/variadic/tests/known/oracle/printf.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf.res.oracle @@ -80,7 +80,7 @@ Translating call to printf to a call to the specialized version printf_va_25. [variadic] printf.c:69: Translating call to printf to a call to the specialized version printf_va_26. -[variadic] printf.c:71: Warning: +[variadic:libc:format] printf.c:71: Warning: Flag ' ' and conversion specififer x are not compatibles. [variadic] printf.c:71: Fallback translation of call printf to a call to the specialized version printf_fallback_1. diff --git a/src/plugins/variadic/tests/known/oracle/printf_redefined.res.oracle b/src/plugins/variadic/tests/known/oracle/printf_redefined.res.oracle index 1ff7860624147066f1690732686cd5674ee8335a..abc776ec38f3d3ae6fbb115af575915cdca048ea 100644 --- a/src/plugins/variadic/tests/known/oracle/printf_redefined.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf_redefined.res.oracle @@ -1,9 +1,11 @@ [variadic] printf_redefined.i:3: Declaration of variadic function printf. -[variadic] Warning: Unable to locate ACSL predicate valid_read_string which should be in the Frama-C LibC. Correct specifications can't be generated. -[variadic] Warning: Unable to locate global __fc_stdout which should be in the Frama-C LibC. Correct specifications can't be generated. +[variadic:libc:frama-c] Warning: + Unable to locate ACSL predicate valid_read_string which should be in the Frama-C LibC. Correct specifications can't be generated. +[variadic:libc:frama-c] Warning: + Unable to locate global __fc_stdout which should be in the Frama-C LibC. Correct specifications can't be generated. [variadic] printf_redefined.i:7: Translating call to printf to a call to the specialized version printf_va_1. -[variadic] printf_redefined.i:7: Warning: +[variadic:typing] printf_redefined.i:7: Warning: Incorrect type for argument 2. The argument will be cast from long to size_t. [eva] Analyzing a complete application starting at main [eva] Computing initial state diff --git a/src/plugins/variadic/tests/known/oracle/printf_wrong_arity.res.oracle b/src/plugins/variadic/tests/known/oracle/printf_wrong_arity.res.oracle index 813cf4c15be5ee6856815cd37365c99e63426633..35de0b879c14ee9c6eddf3bfd0f3f0c70931e104 100644 --- a/src/plugins/variadic/tests/known/oracle/printf_wrong_arity.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf_wrong_arity.res.oracle @@ -18,11 +18,11 @@ Declaration of variadic function asprintf. [variadic] printf_wrong_arity.c:8: Translating call to printf to a call to the specialized version printf_va_1. -[variadic] printf_wrong_arity.c:8: Warning: +[variadic:typing] printf_wrong_arity.c:8: Warning: Too many arguments: expected 2, given 3. Superfluous arguments will be removed. [variadic] printf_wrong_arity.c:9: Translating call to printf to a call to the specialized version printf_va_2. -[variadic] printf_wrong_arity.c:9: Warning: +[variadic:typing] printf_wrong_arity.c:9: Warning: Not enough arguments: expected 3, given 2. [variadic] printf_wrong_arity.c:9: Fallback translation of call printf to a call to the specialized version printf_va_2_fallback_1. diff --git a/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle b/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle index b1028e13ef6ba60d653ab15e6613988822637d94..14b7c5c54a5649abc9300193ae62421ea2bbd68f 100644 --- a/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf_wrong_types.res.oracle @@ -20,61 +20,61 @@ Translating call to printf to a call to the specialized version printf_va_1. [variadic] printf_wrong_types.c:19: Translating call to printf to a call to the specialized version printf_va_2. -[variadic] printf_wrong_types.c:19: Warning: +[variadic:typing] printf_wrong_types.c:19: Warning: Incorrect type for argument 2. The argument will be cast from unsigned int to int. [variadic] printf_wrong_types.c:20: Translating call to printf to a call to the specialized version printf_va_3. -[variadic] printf_wrong_types.c:20: Warning: +[variadic:typing] printf_wrong_types.c:20: Warning: Incorrect type for argument 2. The argument will be cast from int to unsigned int. [variadic] printf_wrong_types.c:21: Translating call to printf to a call to the specialized version printf_va_4. -[variadic] printf_wrong_types.c:21: Warning: +[variadic:typing] printf_wrong_types.c:21: Warning: Incorrect type for argument 2. The argument will be cast from int to long. [variadic] printf_wrong_types.c:22: Translating call to printf to a call to the specialized version printf_va_5. -[variadic] printf_wrong_types.c:22: Warning: +[variadic:typing] printf_wrong_types.c:22: Warning: Incorrect type for argument 2. The argument will be cast from long to int. [variadic] printf_wrong_types.c:23: Translating call to printf to a call to the specialized version printf_va_6. -[variadic] printf_wrong_types.c:23: Warning: +[variadic:typing] printf_wrong_types.c:23: Warning: Incorrect type for argument 2. The argument will be cast from unsigned int to unsigned long. [variadic] printf_wrong_types.c:24: Translating call to printf to a call to the specialized version printf_va_7. -[variadic] printf_wrong_types.c:24: Warning: +[variadic:typing] printf_wrong_types.c:24: Warning: Incorrect type for argument 2. The argument will be cast from unsigned long to unsigned int. [variadic] printf_wrong_types.c:25: Translating call to printf to a call to the specialized version printf_va_8. -[variadic] printf_wrong_types.c:25: Warning: +[variadic:typing] printf_wrong_types.c:25: Warning: Incorrect type for argument 2. The argument will be cast from unsigned int to void *. [variadic] printf_wrong_types.c:26: Translating call to printf to a call to the specialized version printf_va_9. [variadic] printf_wrong_types.c:27: Translating call to printf to a call to the specialized version printf_va_10. -[variadic] printf_wrong_types.c:27: Warning: +[variadic:typing] printf_wrong_types.c:27: Warning: Incorrect type for argument 2. The argument will be cast from long double to double. [variadic] printf_wrong_types.c:28: Translating call to printf to a call to the specialized version printf_va_11. -[variadic] printf_wrong_types.c:28: Warning: +[variadic:typing] printf_wrong_types.c:28: Warning: Incorrect type for argument 2. The argument will be cast from long double to double. [variadic] printf_wrong_types.c:29: Translating call to printf to a call to the specialized version printf_va_12. -[variadic] printf_wrong_types.c:29: Warning: +[variadic:typing] printf_wrong_types.c:29: Warning: Incorrect type for argument 2. The argument will be cast from double to long double. [variadic] printf_wrong_types.c:30: Translating call to printf to a call to the specialized version printf_va_13. -[variadic] printf_wrong_types.c:30: Warning: +[variadic:typing] printf_wrong_types.c:30: Warning: Incorrect type for argument 2. The argument will be cast from int to char *. [variadic] printf_wrong_types.c:31: Translating call to printf to a call to the specialized version printf_va_14. -[variadic] printf_wrong_types.c:31: Warning: +[variadic:typing] printf_wrong_types.c:31: Warning: Incorrect type for argument 2. The argument will be cast from char * to int. [variadic] printf_wrong_types.c:35: Translating call to printf to a call to the specialized version printf_va_15. -[variadic] printf_wrong_types.c:35: Warning: +[variadic:typing] printf_wrong_types.c:35: Warning: Possible portability issues with enum type for argument 2 (use -variadic-no-strict to avoid this warning). [variadic] printf_wrong_types.c:36: Translating call to printf to a call to the specialized version printf_va_16. -[variadic] printf_wrong_types.c:36: Warning: +[variadic:typing] printf_wrong_types.c:36: Warning: Incorrect type for argument 2. The argument will be cast from RC (unsigned int) to int. [eva] Analyzing a complete application starting at main [eva] Computing initial state @@ -434,59 +434,59 @@ int main(void) Translating call to printf to a call to the specialized version printf_va_1. [variadic] printf_wrong_types.c:19: Translating call to printf to a call to the specialized version printf_va_2. -[variadic] printf_wrong_types.c:19: Warning: +[variadic:typing] printf_wrong_types.c:19: Warning: Incorrect type for argument 2. The argument will be cast from unsigned int to int. [variadic] printf_wrong_types.c:20: Translating call to printf to a call to the specialized version printf_va_3. -[variadic] printf_wrong_types.c:20: Warning: +[variadic:typing] printf_wrong_types.c:20: Warning: Incorrect type for argument 2. The argument will be cast from int to unsigned int. [variadic] printf_wrong_types.c:21: Translating call to printf to a call to the specialized version printf_va_4. -[variadic] printf_wrong_types.c:21: Warning: +[variadic:typing] printf_wrong_types.c:21: Warning: Incorrect type for argument 2. The argument will be cast from int to long. [variadic] printf_wrong_types.c:22: Translating call to printf to a call to the specialized version printf_va_5. -[variadic] printf_wrong_types.c:22: Warning: +[variadic:typing] printf_wrong_types.c:22: Warning: Incorrect type for argument 2. The argument will be cast from long to int. [variadic] printf_wrong_types.c:23: Translating call to printf to a call to the specialized version printf_va_6. -[variadic] printf_wrong_types.c:23: Warning: +[variadic:typing] printf_wrong_types.c:23: Warning: Incorrect type for argument 2. The argument will be cast from unsigned int to unsigned long. [variadic] printf_wrong_types.c:24: Translating call to printf to a call to the specialized version printf_va_7. -[variadic] printf_wrong_types.c:24: Warning: +[variadic:typing] printf_wrong_types.c:24: Warning: Incorrect type for argument 2. The argument will be cast from unsigned long to unsigned int. [variadic] printf_wrong_types.c:25: Translating call to printf to a call to the specialized version printf_va_8. -[variadic] printf_wrong_types.c:25: Warning: +[variadic:typing] printf_wrong_types.c:25: Warning: Incorrect type for argument 2. The argument will be cast from unsigned int to void *. [variadic] printf_wrong_types.c:26: Translating call to printf to a call to the specialized version printf_va_9. [variadic] printf_wrong_types.c:27: Translating call to printf to a call to the specialized version printf_va_10. -[variadic] printf_wrong_types.c:27: Warning: +[variadic:typing] printf_wrong_types.c:27: Warning: Incorrect type for argument 2. The argument will be cast from long double to double. [variadic] printf_wrong_types.c:28: Translating call to printf to a call to the specialized version printf_va_11. -[variadic] printf_wrong_types.c:28: Warning: +[variadic:typing] printf_wrong_types.c:28: Warning: Incorrect type for argument 2. The argument will be cast from long double to double. [variadic] printf_wrong_types.c:29: Translating call to printf to a call to the specialized version printf_va_12. -[variadic] printf_wrong_types.c:29: Warning: +[variadic:typing] printf_wrong_types.c:29: Warning: Incorrect type for argument 2. The argument will be cast from double to long double. [variadic] printf_wrong_types.c:30: Translating call to printf to a call to the specialized version printf_va_13. -[variadic] printf_wrong_types.c:30: Warning: +[variadic:typing] printf_wrong_types.c:30: Warning: Incorrect type for argument 2. The argument will be cast from int to char *. [variadic] printf_wrong_types.c:31: Translating call to printf to a call to the specialized version printf_va_14. -[variadic] printf_wrong_types.c:31: Warning: +[variadic:typing] printf_wrong_types.c:31: Warning: Incorrect type for argument 2. The argument will be cast from char * to int. [variadic] printf_wrong_types.c:35: Translating call to printf to a call to the specialized version printf_va_15. [variadic] printf_wrong_types.c:36: Translating call to printf to a call to the specialized version printf_va_16. -[variadic] printf_wrong_types.c:36: Warning: +[variadic:typing] printf_wrong_types.c:36: Warning: Incorrect type for argument 2. The argument will be cast from RC (unsigned int) to int. [eva] Analyzing a complete application starting at main [eva] Computing initial state diff --git a/src/plugins/variadic/tests/known/oracle/scanf_wrong.res.oracle b/src/plugins/variadic/tests/known/oracle/scanf_wrong.res.oracle index eb258278992cde8aa8c15de5065f3322c83a910f..56a0358892b3575428cb56d25b94cc223a1f1e09 100644 --- a/src/plugins/variadic/tests/known/oracle/scanf_wrong.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/scanf_wrong.res.oracle @@ -18,7 +18,7 @@ Declaration of variadic function asprintf. [variadic] scanf_wrong.c:8: Translating call to scanf to a call to the specialized version scanf_va_1. -[variadic] scanf_wrong.c:8: Warning: +[variadic:typing] scanf_wrong.c:8: Warning: Incorrect type for argument 2. The argument will be cast from double to char *. [eva] Analyzing a complete application starting at main [eva] Computing initial state