Skip to content

Conversation

Defenso-QTH
Copy link
Contributor

The implicit cast is incompatible with standard compiler options in a C++ project, making the library difficult to use.

The explicit cast is already the workaround in libcasper.h:

cap_channel_t *chan;
chan = (cap_channel_t *)malloc(sizeof(*chan));

Discussed with @kevans91

The implicit cast is incompatible with standard compiler options in a
C++ project, making the library difficult to use.

Signed-off-by: Quentin Thébault <[email protected]>
Sponsored by: Defenso
MFC after: 3 days
Discussed with: kevans
@emaste
Copy link
Member

emaste commented Oct 9, 2025

Looks good, @VexedUXR do you want to push it to main? I can otherwise

@VexedUXR
Copy link
Member

VexedUXR commented Oct 9, 2025

Looks good, @VexedUXR do you want to push it to main? I can otherwise

You can push it :)

@emaste emaste added the merged Closed commit that's been merged label Oct 9, 2025
@emaste emaste closed this Oct 9, 2025
freebsd-git pushed a commit that referenced this pull request Oct 9, 2025
The implicit cast is incompatible with standard compiler options in a
C++ project, making the library difficult to use.

Signed-off-by: Quentin Thébault <[email protected]>
Sponsored by: Defenso
MFC after: 3 days
Discussed with: kevans
Reviewed by: emaste, vexeduxr
Pull request: #1857
@Defenso-QTH Defenso-QTH deleted the fileargs-cast branch October 9, 2025 23:15
freebsd-git pushed a commit that referenced this pull request Oct 12, 2025
The implicit cast is incompatible with standard compiler options in a
C++ project, making the library difficult to use.

Signed-off-by: Quentin Thébault <[email protected]>
Sponsored by: Defenso
MFC after: 3 days
Discussed with: kevans
Reviewed by: emaste, vexeduxr
Pull request: #1857

(cherry picked from commit 349da4d)
freebsd-git pushed a commit that referenced this pull request Oct 12, 2025
The implicit cast is incompatible with standard compiler options in a
C++ project, making the library difficult to use.

Signed-off-by: Quentin Thébault <[email protected]>
Sponsored by: Defenso
MFC after: 3 days
Discussed with: kevans
Reviewed by: emaste, vexeduxr
Pull request: #1857

(cherry picked from commit 349da4d)
(cherry picked from commit 998dd4a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged Closed commit that's been merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants