sysprog21 / simplefs

A simple native file system for Linux kernel
Other
362 stars 91 forks source link

Fix errors raised by missing-prototypes #46

Closed HotMercury closed 4 months ago

HotMercury commented 4 months ago

In the current attempt to run simplefs on the Linux kernel v6.8 environment, encountering the error "no previous prototype for simplefs_mount" indicates a need for additional function declarations.

error: no previous prototype for ‘simplefs_mount’
error: no previous prototype for ‘simplefs_kill_sb’ 

The reason why it worked in previous versions is that the changes related to -Wmissing-declarations and -Wmissing-prototypes were introduced in 6.8-rc1 in commit 0fcb708 .

HotMercury commented 4 months ago

Can I fix it like this? The original program triggered compile-time errors due to missing function prototype declarations for 'simplefs_mount' and 'simplefs_kill_sb'. This commit addresses the issue by adding the necessary function prototype declarations, resolving the compilation errors.

jserv commented 4 months ago

Can I fix it like this? The original program triggered compile-time errors due to missing function prototype declarations for 'simplefs_mount' and 'simplefs_kill_sb'. This commit addresses the issue by adding the necessary function prototype declarations, resolving the compilation errors.

No, you must mention the considerations of upstream Linux changes that enforce function prototype checks, along with their impact on this project. Additionally, it is important to be aware of how to avoid missing function prototypes.

jserv commented 4 months ago

Thank @HotMercury for contributing!