Re: assignment type mismatch complaints - Mailing list pgsql-hackers

From Tom Lane
Subject Re: assignment type mismatch complaints
Date
Msg-id 132.1035674836@sss.pgh.pa.us
Whole thread Raw
In response to assignment type mismatch complaints  (Larry Rosenman <ler@lerctr.org>)
Responses Re: assignment type mismatch complaints  (Larry Rosenman <ler@lerctr.org>)
List pgsql-hackers
Larry Rosenman <ler@lerctr.org> writes:
> How concerned are we about assignment type mismatch warnings? 

They're probably all "char versus unsigned char" complaints?

There are a ton of them on compilers that care about it; most of
'em in the multibyte support.  While it would be nice to clean up
all that someday, I can't say that I think it's a really profitable
use of time.

One difficulty is that the obvious fix (add a bunch of casts) is
probably a net degradation of the code.  Explicit casts will hide
mismatches that are a lot worse than char signedness, and so
cluttering the code with them makes things more fragile IMHO.
I think an acceptable fix would involve running around and changing
datatype and function declarations; which is much more subtle and
thought-requiring than throwing in a cast wherever the compiler
burps.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: UnixWare 7.1.3: with current CVS, and cc -Xb.,..
Next
From: Larry Rosenman
Date:
Subject: Re: assignment type mismatch complaints