From c2aacfa9c4460ce15b14f01553c8960bccd0c0ba Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Wed, 5 Apr 2023 11:30:20 +0200 Subject: [PATCH] vfs: fix build error with gcc 12 Fixes #4839 --- repos/os/src/lib/vfs/ram_file_system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index cc6ae4101e..9b9ceada9d 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -753,11 +753,11 @@ class Vfs::Ram_file_system : public Vfs::File_system Vfs_ram::Node &node = ram_handle->node; bool node_modified = ram_handle->modifying; - ram_handle->node.close(*ram_handle); + node.close(*ram_handle); destroy(vfs_handle->alloc(), ram_handle); - if (ram_handle->node.unlinked() && !ram_handle->node.opened()) { - destroy(_env.alloc(), &ram_handle->node); + if (node.unlinked() && !node.opened()) { + destroy(_env.alloc(), &node); } else if (node_modified) { node.notify(); }