lkml.org 
[lkml]   [2016]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] qed: add missing header dependencies
Date
> We get 4 warnings when building kernel with W=1:
> drivers/net/ethernet/qlogic/qed/qed_selftest.c:6:5: warning: no previous
> prototype for 'qed_selftest_memory' [-Wmissing-prototypes]
> drivers/net/ethernet/qlogic/qed/qed_selftest.c:19:5: warning: no previous
> prototype for 'qed_selftest_interrupt' [-Wmissing-prototypes]
> drivers/net/ethernet/qlogic/qed/qed_selftest.c:32:5: warning: no previous
> prototype for 'qed_selftest_register' [-Wmissing-prototypes]
> drivers/net/ethernet/qlogic/qed/qed_selftest.c:55:5: warning: no previous
> prototype for 'qed_selftest_clock' [-Wmissing-prototypes]
>
> In fact, these functions are declared in qed_selftest.h, so this patch add missing
> header dependencies.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>

While I obviously have no strong objection for including qed_selftest.h
from qed_selftest.c, I'm not sure I understand which C standard dictates
this requirement.
Why should a function definition [not call] be preceded by a prototype?

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.079 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site