Skip to content

Conversation

@onlyspxctre
Copy link

#1406

Some of the warnings that were brought up in #23 had already been resolved, but these were the residual warnings I had encountered and fixed when compiling with Clang 19.

Rebased from master. First time contributor so I'm not really sure exactly how y'all want this, hopefully this is fine.


client->req_len = req.length = 1;
REQUEST_FIXED_SIZE(req, SIZE_MAX);
REQUEST_FIXED_SIZE(req, UINT_MAX);
Copy link
Contributor

Choose a reason for hiding this comment

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

@metux is this right?
Doesn't this test what happens on overflow?

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed looks so.

@metux
Copy link
Contributor

metux commented Nov 17, 2025

#1406

Some of the warnings that were brought up in #23 had already been resolved, but these were the residual warnings I had encountered and fixed when compiling with Clang 19.

Rebased from master. First time contributor so I'm not really sure exactly how y'all want this, hopefully this is fine.

There's no need to create new PRs after rebase - you can use forced push (git push +)

@onlyspxctre
Copy link
Author

#1406

Some of the warnings that were brought up in #23 had already been resolved, but these were the residual warnings I had encountered and fixed when compiling with Clang 19.

Rebased from master. First time contributor so I'm not really sure exactly how y'all want this, hopefully this is fine.

There's no need to create new PRs after rebase - you can use forced push (git push +)

Closing the old PR was not intentional; I renamed the branch without realizing that it would close the pull request.

@metux
Copy link
Contributor

metux commented Nov 18, 2025

#1406

Some of the warnings that were brought up in #23 had already been resolved, but these were the residual warnings I had encountered and fixed when compiling with Clang 19.

Rebased from master. First time contributor so I'm not really sure exactly how y'all want this, hopefully this is fine.

There's no need to create new PRs after rebase - you can use forced push (git push +)

Closing the old PR was not intentional; I renamed the branch without realizing that it would close the pull request.

By "renaming" you mean pushing as a new one and deleting the old one ?
Yes that closes PRs.

@onlyspxctre
Copy link
Author

#1406

Some of the warnings that were brought up in #23 had already been resolved, but these were the residual warnings I had encountered and fixed when compiling with Clang 19.

Rebased from master. First time contributor so I'm not really sure exactly how y'all want this, hopefully this is fine.

There's no need to create new PRs after rebase - you can use forced push (git push +)

Closing the old PR was not intentional; I renamed the branch without realizing that it would close the pull request.

By "renaming" you mean pushing as a new one and deleting the old one ? Yes that closes PRs.

Yeah. It was accidental. Everything should be good now

Bit-shifting a negative integer leads to undefined behavior. Fixed by
negating the entire bitshift operation, rather than bitshifting a
negative value.

This fixes one of the Clang warnings as mentioned in X11Libre#23.

Signed-off-by: Spxctre <[email protected]>
…ned int` to `SIZE_MAX`

`SIZE_MAX` is out of the range of `client->req_len` (unsigned int).
Compare `client->req_len` to `UINT_MAX` instead.

This fixes one of the Clang warnings as mentioned in X11Libre#23.

Signed-off-by: Spxctre <[email protected]>
…hile body

The `SYSCALL` macro can seldom generate a warning in Clang when used
immediately before another macro (e.g. `DebugF`). We can explicitly
define the empty body to suppress these warnings.

Signed-off-by: Spxctre <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants