Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Apr 8, 2022

pthread_setcancelstate and pthread_setcanceltype previously did not have any
arguments in library_pthread_stub.c. Fix them to take the proper arguments.

pthread_setcancelstate and pthread_setcanceltype previously did not have any
arguments in library_pthread_stub.c. Fix them to take the proper arguments.
@tlively tlively requested review from kripken and sbc100 April 8, 2022 21:15
@tlively tlively enabled auto-merge (squash) April 8, 2022 21:19
@dschuff
Copy link
Member

dschuff commented Apr 8, 2022

LGTM, I'm just going to merge this.

@dschuff dschuff disabled auto-merge April 8, 2022 21:56
@dschuff dschuff merged commit ce0ed66 into main Apr 8, 2022
@dschuff dschuff deleted the pthread-stub-signatures branch April 8, 2022 21:56
return 0;
}

int pthread_setcancelstate() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did the compiler allow this in the first place? Are we missing a header in include here?

Copy link
Member Author

Choose a reason for hiding this comment

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

In C prior to C23, this is K&R-style function definition since it is missing void in the parameter location. Which I guess means it matches with any declaration? It's kind of weird because I would have expected the non-K&R declaration to force the definition to have the proper type, but idk exactly how this works.

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.

4 participants