Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix current CI failures on push #21823

Closed
wants to merge 6 commits into from
Closed

Conversation

t8m
Copy link
Member

@t8m t8m commented Aug 23, 2023

No description provided.

The TLS record type is a single byte value so we can
use uint8_t for it. This allows passing its address
directly to SSL_trace() instead of converting it to
a single byte type first.
They produce a warning `suggest braces around initialization of subobject`
otherwise.
@t8m t8m added branch: master Merge to master branch approval: review pending This pull request needs review by a committer approval: otc review pending This pull request needs review by an OTC member triaged: bug The issue/pr is/fixes a bug tests: exempted The PR is exempt from requirements for testing labels Aug 23, 2023
@t8m
Copy link
Member Author

t8m commented Aug 23, 2023

The last commit that adjusts the CI runs is to be dropped when merging.

hlandau
hlandau previously approved these changes Aug 23, 2023
@hlandau
Copy link
Member

hlandau commented Aug 23, 2023

I am skeptical about the value of -Wmissing-braces. {0} is entirely valid.

@t8m
Copy link
Member Author

t8m commented Aug 23, 2023

I am skeptical about the value of -Wmissing-braces. {0} is entirely valid.

Yeah, I hate it as well. We could remove it from the strict warning set.

Add -Wno-missing-braces to silence old clang compilers

And drop unnecessary braces in zeroing initializers.
@t8m
Copy link
Member Author

t8m commented Aug 23, 2023

Instead of adding the braces I've switched-off the warning.

@@ -507,7 +507,7 @@ struct ossl_record_method_st {
* multiple records in one go and buffer them.
*/
int (*read_record)(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
int *type, unsigned char **data, size_t *datalen,
uint8_t *type, unsigned char **data, size_t *datalen,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to change this type I think it has ripple effects in libssl, e.g. I would also suggest changing the type of type and recvd_type in ssl3_read_bytes and dtls1_read_bytes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK these are assigned and not passed as pointer to them so type conversion should happen fine. But I can change it anyway if you prefer that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattcaswell it was quite spread throughout the code but AFAIK done now, please look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was quite spread throughout the code but AFAIK done now, please look.

Yeah - this is what I meant by a ripple effect.

But I can change it anyway if you prefer that.

I really dislike this type dissonance where we use different types for the same thing in different places. Looks much better now.

@mattcaswell mattcaswell removed the approval: otc review pending This pull request needs review by an OTC member label Aug 24, 2023
@hlandau hlandau added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Aug 24, 2023
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Aug 25, 2023
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Aug 25, 2023
@hlandau
Copy link
Member

hlandau commented Aug 25, 2023

Merged to master. Thank you.

@hlandau hlandau closed this Aug 25, 2023
openssl-machine pushed a commit that referenced this pull request Aug 25, 2023
The TLS record type is a single byte value so we can
use uint8_t for it. This allows passing its address
directly to SSL_trace() instead of converting it to
a single byte type first.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21823)
openssl-machine pushed a commit that referenced this pull request Aug 25, 2023
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21823)
openssl-machine pushed a commit that referenced this pull request Aug 25, 2023
They produce a warning `suggest braces around initialization of subobject`
otherwise.

Add -Wno-missing-braces to silence old clang compilers

And drop unnecessary braces in zeroing initializers.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21823)
openssl-machine pushed a commit that referenced this pull request Aug 25, 2023
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21823)
openssl-machine pushed a commit that referenced this pull request Aug 25, 2023
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21823)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch tests: exempted The PR is exempt from requirements for testing triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants