From 1a12d5852602a7507d5911408561a754c446539c Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Mon, 8 Apr 2024 10:48:24 +0200 Subject: Work around GCC14 memleak diagnostic While both pointers are identical, GCC-14 with -fanalyzer complains about these return statements to leak memory. The leak is only reported with LTO though. --- openbsd/OpenBSDProcess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsd') diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c index 4ac7aef1..7f50b0f8 100644 --- a/openbsd/OpenBSDProcess.c +++ b/openbsd/OpenBSDProcess.c @@ -211,7 +211,7 @@ Process* OpenBSDProcess_new(const Machine* host) { OpenBSDProcess* this = xCalloc(1, sizeof(OpenBSDProcess)); Object_setClass(this, Class(OpenBSDProcess)); Process_init(&this->super, host); - return &this->super; + return (Process*)this; } void Process_delete(Object* cast) { -- cgit v1.2.3