On Tue, Aug 23, 2022 at 3:43 PM Tom Lane wrote:
> Thomas Munro writes:
> > I was nerd-sniped by the historical context of this single line of
> > code. I'd already wondered many times (not just in PostgreSQL)
> > whether and when that became a cargo-cult practice, replicated from
> > other softw
Thomas Munro writes:
> I was nerd-sniped by the historical context of this single line of
> code. I'd already wondered many times (not just in PostgreSQL)
> whether and when that became a cargo-cult practice, replicated from
> other software and older books like Stevens. I failed to find any
> s
On Tue, Feb 15, 2022 at 4:21 AM Tom Lane wrote:
> Thomas Munro writes:
> > On Mon, Feb 14, 2022 at 7:19 PM Tom Lane wrote:
> >> I'm leaning to adding a compile-time clamp on the value,
> >> that is
> >>
> >> unp->sun_len = Min(sizeof(struct sockaddr_un),
> >> (1 << (
On Tue, Feb 15, 2022 at 3:25 AM Robert Haas wrote:
> It's not real clear to me that it's worth complicating the code to
> avoid a harmless compiler warning on an 11-year-old operating system
> with minimal real-world usage. On the other hand, if you really feel
> motivated to do something about it
Thomas Munro writes:
> On Mon, Feb 14, 2022 at 7:19 PM Tom Lane wrote:
>> I'm leaning to adding a compile-time clamp on the value,
>> that is
>>
>> unp->sun_len = Min(sizeof(struct sockaddr_un),
>> (1 << (sizeof(unp->sun_len) * 8)) - 1);
> Any system that has sun_le
Robert Haas writes:
> On Mon, Feb 14, 2022 at 1:19 AM Tom Lane wrote:
>> For a very long time, the AIX 7.1 buildfarm members (sungazer and tern)
>> have complained about
>> ip.c:236:17: warning: conversion from 'long unsigned int' to 'uchar_t' {aka
>> 'unsigned char'} changes value from '1025' t
On Mon, Feb 14, 2022 at 1:19 AM Tom Lane wrote:
> For a very long time, the AIX 7.1 buildfarm members (sungazer and tern)
> have complained about
>
> ip.c:236:17: warning: conversion from 'long unsigned int' to 'uchar_t' {aka
> 'unsigned char'} changes value from '1025' to '1' [-Woverflow]
>
> I'
On Mon, Feb 14, 2022 at 7:19 PM Tom Lane wrote:
> For a very long time, the AIX 7.1 buildfarm members (sungazer and tern)
> have complained about
>
> ip.c:236:17: warning: conversion from 'long unsigned int' to 'uchar_t' {aka
> 'unsigned char'} changes value from '1025' to '1' [-Woverflow]
>
> I'
For a very long time, the AIX 7.1 buildfarm members (sungazer and tern)
have complained about
ip.c:236:17: warning: conversion from 'long unsigned int' to 'uchar_t' {aka
'unsigned char'} changes value from '1025' to '1' [-Woverflow]
I'd ignored this as not being very interesting, but I got motiv