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.
wilder
Benny Baumann 2 years ago committed by BenBE
parent 327593e5cd
commit 1a12d58526
  1. 2
      darwin/DarwinProcess.c
  2. 2
      dragonflybsd/DragonFlyBSDProcess.c
  3. 2
      freebsd/FreeBSDProcess.c
  4. 2
      linux/LinuxProcess.c
  5. 2
      netbsd/NetBSDProcess.c
  6. 2
      openbsd/OpenBSDProcess.c
  7. 2
      pcp/PCPProcess.c
  8. 2
      solaris/SolarisProcess.c

@ -62,7 +62,7 @@ Process* DarwinProcess_new(const Machine* host) {
this->taskAccess = true;
this->translated = false;
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

@ -56,7 +56,7 @@ Process* DragonFlyBSDProcess_new(const Machine* host) {
DragonFlyBSDProcess* this = xCalloc(1, sizeof(DragonFlyBSDProcess));
Object_setClass(this, Class(DragonFlyBSDProcess));
Process_init(&this->super, host);
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

@ -62,7 +62,7 @@ Process* FreeBSDProcess_new(const Machine* machine) {
FreeBSDProcess* this = xCalloc(1, sizeof(FreeBSDProcess));
Object_setClass(this, Class(FreeBSDProcess));
Process_init(&this->super, machine);
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

@ -118,7 +118,7 @@ Process* LinuxProcess_new(const Machine* host) {
LinuxProcess* this = xCalloc(1, sizeof(LinuxProcess));
Object_setClass(this, Class(LinuxProcess));
Process_init(&this->super, host);
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

@ -219,7 +219,7 @@ Process* NetBSDProcess_new(const Machine* host) {
NetBSDProcess* this = xCalloc(1, sizeof(NetBSDProcess));
Object_setClass(this, Class(NetBSDProcess));
Process_init(&this->super, host);
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

@ -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) {

@ -97,7 +97,7 @@ Process* PCPProcess_new(const Machine* host) {
PCPProcess* this = xCalloc(1, sizeof(PCPProcess));
Object_setClass(this, Class(PCPProcess));
Process_init(&this->super, host);
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

@ -64,7 +64,7 @@ Process* SolarisProcess_new(const Machine* host) {
SolarisProcess* this = xCalloc(1, sizeof(SolarisProcess));
Object_setClass(this, Class(SolarisProcess));
Process_init(&this->super, host);
return &this->super;
return (Process*)this;
}
void Process_delete(Object* cast) {

Loading…
Cancel
Save