[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-sparse
Subject:    Re: [RFC PATCH] Fix -Wtypesign
From:       Linus Torvalds <torvalds () osdl ! org>
Date:       2006-07-14 5:36:36
Message-ID: Pine.LNX.4.64.0607132232310.5623 () g5 ! osdl ! org
[Download RAW message or body]



On Thu, 13 Jul 2006, Pavel Roskin wrote:
>
> Fix -Wtypesign
> 
> Run evaluate_symbol() before check_duplicates() so that the signedness
> of the token is known by the time the token is compared with other
> tokens.
> 
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
> 
>  evaluate.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/evaluate.c b/evaluate.c
> index 42005eb..2561f38 100644
> --- a/evaluate.c
> +++ b/evaluate.c
> @@ -2473,8 +2473,8 @@ void evaluate_symbol_list(struct symbol_
>  	struct symbol *sym;
>  
>  	FOR_EACH_PTR(list, sym) {
> -		check_duplicates(sym);
>  		evaluate_symbol(sym);
> +		check_duplicates(sym);


That, on the face of it, looks "Obviously Correct(tm)".

I'm wondering if I had some reason for doing them in what is obviously the 
wrong order, which worries me a bit, but quite frankly, the most likely 
reasons is just that it was a thinko.

(Long long ago, I did "check_duplicates()" from _within_ evaluation, 
which had serious recursion issues, so there's been confusion here 
before).

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic