Skip to content

Fix -fanalyzer errors so frogfs builds with CONFIG_COMPILER_STATIC_ANALYZER=y - #78

Open
hyrsky wants to merge 3 commits into
jkent:mainfrom
hyrsky:fix-static-analyze-errors
Open

Fix -fanalyzer errors so frogfs builds with CONFIG_COMPILER_STATIC_ANALYZER=y#78
hyrsky wants to merge 3 commits into
jkent:mainfrom
hyrsky:fix-static-analyze-errors

Conversation

@hyrsky

@hyrsky hyrsky commented May 7, 2026

Copy link
Copy Markdown

Hello!

I wanted to enable CONFIG_COMPILER_STATIC_ANALYZER=y on my project, but frogfs trips three -fanalyzer errors, so the build fails. This PR fixes all three issues.

Fixes #77.

hyrsky added 3 commits May 7, 2026 19:48
frogfs_get_path() returns NULL when its calloc() fails, but
frogfs_get_entry() passed the result directly to strcmp() without
checking. gcc 15's -fanalyzer flags this as -Wanalyzer-null-argument.
frogfs_vfs_opendir() did not check the malloc result for dh, and
also returned without freeing dh when frogfs_get_entry() failed.
open_miniz() returned -1 without freeing priv when the gzip
compression method byte was not 8 (deflate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frogfs fails to build with CONFIG_COMPILER_STATIC_ANALYZER=y

1 participant