Re: Signed vs. Unsigned (some)

2022-02-13 Thread Ranier Vilela
Em sex., 11 de jun. de 2021 às 23:05, Ranier Vilela escreveu: > Hi, > > Removing legitimate warnings can it be worth it? > > -1 CAST can be wrong, when there is an invalid value defined > (InvalidBucket, InvalidBlockNumber). > I think depending on the compiler -1 CAST may be different from >

Re: Signed vs. Unsigned (some)

2021-07-02 Thread Ranier Vilela
Em sex., 2 de jul. de 2021 às 13:29, Alvaro Herrera escreveu: > On 2021-Jul-02, Justin Pryzby wrote: > > > On Fri, Jul 02, 2021 at 12:09:23PM +0200, Peter Eisentraut wrote: > > > > The use of InvalidBlockNumber with vac_update_relstats() looks a bit > fishy > > > to me. We are using in the same

Re: Signed vs. Unsigned (some)

2021-07-02 Thread Alvaro Herrera
On 2021-Jul-02, Justin Pryzby wrote: > On Fri, Jul 02, 2021 at 12:09:23PM +0200, Peter Eisentraut wrote: > > The use of InvalidBlockNumber with vac_update_relstats() looks a bit fishy > > to me. We are using in the same call 0 as the default for > > num_all_visible_pages, and we generally

Re: Signed vs. Unsigned (some)

2021-07-02 Thread Justin Pryzby
On Fri, Jul 02, 2021 at 12:09:23PM +0200, Peter Eisentraut wrote: > On 16.06.21 10:48, Peter Eisentraut wrote: > > On 15.06.21 10:17, Kyotaro Horiguchi wrote: > > > The definitions are not ((type) -1) but ((type) 0x) so > > > actually they might be different if we forget to widen the

Re: Signed vs. Unsigned (some)

2021-07-02 Thread Ranier Vilela
Em sex., 2 de jul. de 2021 às 07:09, Peter Eisentraut < peter.eisentr...@enterprisedb.com> escreveu: > On 16.06.21 10:48, Peter Eisentraut wrote: > > On 15.06.21 10:17, Kyotaro Horiguchi wrote: > >> The definitions are not ((type) -1) but ((type) 0x) so > >> actually they might be

Re: Signed vs. Unsigned (some)

2021-07-02 Thread Peter Eisentraut
On 16.06.21 10:48, Peter Eisentraut wrote: On 15.06.21 10:17, Kyotaro Horiguchi wrote: The definitions are not ((type) -1) but ((type) 0x) so actually they might be different if we forget to widen the constant when widening the types.  Regarding to the compiler behavior, I think we are

Re: Signed vs. Unsigned (some)

2021-06-16 Thread Ranier Vilela
Em qua., 16 de jun. de 2021 às 05:48, Peter Eisentraut < peter.eisentr...@enterprisedb.com> escreveu: > On 15.06.21 10:17, Kyotaro Horiguchi wrote: > > The definitions are not ((type) -1) but ((type) 0x) so > > actually they might be different if we forget to widen the constant > > when

Re: Signed vs. Unsigned (some)

2021-06-16 Thread Peter Eisentraut
On 15.06.21 10:17, Kyotaro Horiguchi wrote: The definitions are not ((type) -1) but ((type) 0x) so actually they might be different if we forget to widen the constant when widening the types. Regarding to the compiler behavior, I think we are assuming C99[1] and C99 defines that -1 is

Re: Signed vs. Unsigned (some)

2021-06-15 Thread Ranier Vilela
Hi Kyotaro, Thanks for taking a look. Em ter., 15 de jun. de 2021 às 05:17, Kyotaro Horiguchi < horikyota@gmail.com> escreveu: > At Fri, 11 Jun 2021 23:05:29 -0300, Ranier Vilela > wrote in > > Hi, > > > > Removing legitimate warnings can it be worth it? > > From what the warning comes

Re: Signed vs. Unsigned (some)

2021-06-15 Thread Kyotaro Horiguchi
At Fri, 11 Jun 2021 23:05:29 -0300, Ranier Vilela wrote in > Hi, > > Removing legitimate warnings can it be worth it? >From what the warning comes from? And what is the exact message? > -1 CAST can be wrong, when there is an invalid value defined > (InvalidBucket, InvalidBlockNumber). > I