Re: [PATCH] fork: Fix two -Wmissing-prototypes warnings

From: Rasmus Villemoes
Date: Tue Nov 13 2018 - 05:26:54 EST


On 13/11/2018 08.26, Yi Wang wrote:
> We get two warning when building kernel with W=1:
> kernel/fork.c:167:13: warning: no previous prototype for âarch_release_thread_stackâ [-Wmissing-prototypes]
> kernel/fork.c:779:13: warning: no previous prototype for âfork_initâ [-Wmissing-prototypes]

I think you should also remove the "manual" declarations from the .c
files that call the function, in this case fork_init() in init/main.c;
otherwise there's no guarantee that those translation units actually
include the header that contain the proper declaration.

arch_release_thread_stack can probably just be removed completely after
the recent arch cleanup, since bb9d81264 (arch: remove tile port) no
arch seems to implement it.

Rasmus