git: 349da4dbff72 - main - libcasper: explicit cast in cap_fileargs header
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Oct 2025 17:52:28 UTC
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=349da4dbff722a58affd13d84729b1d399b41fb3 commit 349da4dbff722a58affd13d84729b1d399b41fb3 Author: Quentin Thébault <quentin.thebault@defenso.fr> AuthorDate: 2025-09-26 02:04:07 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2025-10-09 17:52:14 +0000 libcasper: explicit cast in cap_fileargs header 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 <quentin.thebault@defenso.fr> Sponsored by: Defenso MFC after: 3 days Discussed with: kevans Reviewed by: emaste, vexeduxr Pull request: https://github.com/freebsd/freebsd-src/pull/1857 --- lib/libcasper/services/cap_fileargs/cap_fileargs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcasper/services/cap_fileargs/cap_fileargs.h b/lib/libcasper/services/cap_fileargs/cap_fileargs.h index 8207671d9753..d3a0150044d7 100644 --- a/lib/libcasper/services/cap_fileargs/cap_fileargs.h +++ b/lib/libcasper/services/cap_fileargs/cap_fileargs.h @@ -75,7 +75,7 @@ fileargs_init(int argc __unused, char *argv[] __unused, int flags, mode_t mode, cap_rights_t *rightsp __unused, int operations __unused) { fileargs_t *fa; - fa = malloc(sizeof(*fa)); + fa = (fileargs_t *)malloc(sizeof(*fa)); if (fa != NULL) { fa->fa_flags = flags; fa->fa_mode = mode;