| From: | Doug McNaught <doug(at)wireboard(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Some architectures need "signed char" declarations |
| Date: | 2002-01-09 20:03:54 |
| Message-ID: | m3wuyr70lx.fsf@varsoon.denali.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Doug Royer <Doug(at)royer(dot)com> writes:
> I deleted the original post, but I think the issue was signed
> versus unsigned comparisons. I think he was saying the
> variable should be explicitly declared as 'signed int'
> (or signed char) and not 'int' (or char) because EOF is (-1).
>
> unsigned int foo;
>
> if (foo == -1) ... causes a warning (or errors)
> on many compilers.
>
> And if the default for int or char is unsigned as it can
> be on some systems, the code does exactly that.
>
> Perhaps he is just wanted to reduce the build time noise?
>
> Apologies if this was not on point.
The point is that this is potentially buggy code.
-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Kalchev | 2002-01-09 20:06:43 | Re: again on index usage |
| Previous Message | Tom Lane | 2002-01-09 19:48:28 | Re: again on index usage |