Skip to content

Conversation

@Earlopain
Copy link
Contributor

selenium-webdriver pinned prism to 1.4.0 because of the following warning (which their compiler treats as an error):

src/prism.c: In function ‘context_terminator’:
src/prism.c:8651:62: error: conversion to ‘unsigned int’ from ‘int’ may change
the sign of the result [-Werror=sign-conversion]
8651 |     return token->type < 32 && (context_terminators[context] & (1 <<
token->type));

I have seen this warning myself during building, but now I can't reproduce anymore. Perhaps CI will tell me more.

@Earlopain Earlopain marked this pull request as draft October 15, 2025 12:50
@froydnj
Copy link
Contributor

froydnj commented Oct 15, 2025

You almost certainly need to cast the 1 to unsigned prior to the shift.

@Earlopain
Copy link
Contributor Author

Oh, I see that -Wconversion is already enabled (which I think includes -Wsign-conversion) 🤷. I can't remember what I did to get this warning myself to confirm anything

@kddnewton
Copy link
Collaborator

I think this is now solved by #3682

@Earlopain
Copy link
Contributor Author

Yeah, probably.

@Earlopain Earlopain closed this Oct 16, 2025
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