Skip to content

fix: unused varibles in vfs #145

@AndreCostaaa

Description

@AndreCostaaa

so3/so3/fs/vfs.c

Lines 292 to 304 in 9fd2100

uint32_t vfs_get_access_mode(int gfd)
{
uint32_t ret;
mutex_lock(&vfs_lock);
if (open_fds[gfd])
ret = open_fds[gfd]->flags_access_mode;
mutex_unlock(&vfs_lock);
return ret;
}

so3/so3/fs/vfs.c

Lines 315 to 326 in 9fd2100

uint32_t vfs_get_operating_mode(int gfd)
{
uint32_t ret;
mutex_lock(&vfs_lock);
if (open_fds[gfd])
ret = open_fds[gfd]->flags_operating_mode;
mutex_unlock(&vfs_lock);
return ret;
}

ret is returned uninitialized whenever the if condition is false in both of these functions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions