Re: assignment type mismatch complaints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: assignment type mismatch complaints
Date: 2002-10-26 23:27:16
Message-ID: 132.1035674836@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Larry Rosenman <ler(at)lerctr(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2002-10-26 23:34:40 Re: assignment type mismatch complaints
Previous Message Bruce Momjian 2002-10-26 20:45:06 Re: UnixWare 7.1.3: with current CVS, and cc -Xb.,..