[PATCH] afs: fix no return warning in afs_dir_dirty_folio
David Howells
dhowells at redhat.com
Mon Jul 24 14:36:33 PDT 2023
zhangshida <starzhangzsd at gmail.com> wrote:
> Quiet down this gcc warning generated by
> mips-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110:
>
> ../fs/afs/dir.c: In function ‘afs_dir_dirty_folio’:
> ../fs/afs/dir.c:52:1: error: no return statement in function returning non-void [-Werror=return-type]
> 52 | }
> | ^
> cc1: all warnings being treated as errors
>
> From code analysis I don't think this is a real problem, but unheeded
> warnings just beget more warnings, and you end up being warning-blind.
No. BUG() is supposed to be noreturn. This error shouldn't happen.
David
More information about the linux-afs
mailing list