Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-18 Thread Tim Düsterhus
Willy, On 10/18/21 10:51 AM, Willy Tarreau wrote: On Mon, Oct 18, 2021 at 09:18:12AM +0200, Tim Düsterhus wrote: Hu, interesting. Is the GitHub Mirror Sync broken? I'm seeing changes in https://git.haproxy.org/?p=haproxy.git, but not in GitHub. So it was in relation with the Painful Access

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-18 Thread Willy Tarreau
On Mon, Oct 18, 2021 at 09:18:12AM +0200, Tim Düsterhus wrote: > Hu, interesting. Is the GitHub Mirror Sync broken? I'm seeing changes in > https://git.haproxy.org/?p=haproxy.git, but not in GitHub. So it was in relation with the Painful Access Token apparently. The mirror user was not allowed

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-18 Thread Willy Tarreau
On Mon, Oct 18, 2021 at 09:18:12AM +0200, Tim Düsterhus wrote: > Willy, > > On 10/18/21 9:15 AM, Willy Tarreau wrote: > > On Mon, Oct 18, 2021 at 09:09:01AM +0200, Tim Düsterhus wrote: > > > Feel free to replace 'unsigned int' with 'uint' and reformat the struct as > > > needed. > > > > Done an

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-18 Thread Tim Düsterhus
Willy, On 10/18/21 9:15 AM, Willy Tarreau wrote: On Mon, Oct 18, 2021 at 09:09:01AM +0200, Tim Düsterhus wrote: Feel free to replace 'unsigned int' with 'uint' and reformat the struct as needed. Done an pushed, thank you! Willy Hu, interesting. Is the GitHub Mirror Sync broken? I'm seeing

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-18 Thread Willy Tarreau
On Mon, Oct 18, 2021 at 09:09:01AM +0200, Tim Düsterhus wrote: > Feel free to replace 'unsigned int' with 'uint' and reformat the struct as > needed. Done an pushed, thank you! Willy

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-18 Thread Tim Düsterhus
Willy, On 10/18/21 7:22 AM, Willy Tarreau wrote: On Sat, Oct 16, 2021 at 06:24:18PM +0200, Tim Duesterhus wrote: see 6a0dd733906611dea958cf74b9f51bb16028ae20 Found using GitHub's CodeQL scan. --- include/haproxy/stick_table-t.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-17 Thread Willy Tarreau
On Sat, Oct 16, 2021 at 06:24:18PM +0200, Tim Duesterhus wrote: > see 6a0dd733906611dea958cf74b9f51bb16028ae20 > > Found using GitHub's CodeQL scan. > --- > include/haproxy/stick_table-t.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

[PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2021-10-16 Thread Tim Duesterhus
see 6a0dd733906611dea958cf74b9f51bb16028ae20 Found using GitHub's CodeQL scan. --- include/haproxy/stick_table-t.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/haproxy/stick_table-t.h b/include/haproxy/stick_table-t.h index 3b1f2b3ef..133f992b5 100644 ---

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2020-01-21 Thread Willy Tarreau
On Sat, Jan 18, 2020 at 11:41:58AM +0100, Tim Düsterhus wrote: > Fair enough. In the specific implementation of gcc it might be okay. But > that doesn't say anything about clang (but I guess it's okay as well). Clang tries hard to support whatever gcc does and when I mean gcc I implicitly also

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2020-01-18 Thread Tim Düsterhus
Willy, Am 18.01.20 um 07:51 schrieb Willy Tarreau: >> - Non-ints are not allowed by the C standard. > > Hmmm that's not exactly what I'm reading in C99 #6.7.2.1 here, which > explicitly permits implementation-defined types: > >"A bit-field shall have a type that is a qualified or

Re: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2020-01-17 Thread Willy Tarreau
oved. Feel free to amend my > patch if necessary. > > Best regards > Tim Düsterhus > > Apply with `git am --scissors` to automatically cut the commit message. > > -- >8 -- > Subject: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields > > - Non-ints are not

[PATCH] CLEANUP: Consistently `unsigned int` for bitfields

2020-01-17 Thread Tim Duesterhus
--scissors` to automatically cut the commit message. -- >8 -- Subject: [PATCH] CLEANUP: Consistently `unsigned int` for bitfields - Non-ints are not allowed by the C standard. - Signed bitfields of size `1` hold the values `0` and `-1`, but are usually assigned `1`, possibly leading to subtle bugs w