Browse Source

qcacld-3.0: Add WAR for ol_txrx_soc_attach -Wmissing-prototypes

Currently ol_txrx.c generates warnings when compiled with the GCC
-Wmissing-prototypes switch because it does not include a header file
which exports a prototype for ol_txrx_soc_attach(). Currently the "dp
soc attach" APIs are defined in a strange manner, and there is not a
prototype which dp_main.c can include. So as a WAR define the
prototype internal to ol_txrx.c itself.

Of course the whole point of -Wmissing-prototypes is to prevent
mismatches between callers of an interface and the implementation of
an interface, and this WAR explicitly bypasses that protection. This
WAR should be superceded in the future by a proper registration
mechanism where the architecture-specific DP implementation attaches
to the Converged Data Path (CDP).

Change-Id: I5d090a6cd54be7808ffb9f542c135edcfe9d0b42
CRs-Fixed: 1110919
Jeff Johnson 8 years ago
parent
commit
02c37b463b
1 changed files with 9 additions and 1 deletions
  1. 9 1
      core/dp/txrx/ol_txrx.c

+ 9 - 1
core/dp/txrx/ol_txrx.c

@@ -5341,7 +5341,15 @@ static struct cdp_ops ol_txrx_ops = {
 	.pmf_ops = &ol_ops_pmf
 };
 
-struct cdp_soc_t *ol_txrx_soc_attach(void *scn_handle, struct ol_if_ops *dp_ol_if_ops)
+/*
+ * Local prototype added to temporarily address warning caused by
+ * -Wmissing-prototypes. A more correct solution, namely to expose
+ * a prototype in an appropriate header file, will come later.
+ */
+struct cdp_soc_t *ol_txrx_soc_attach(void *scn_handle,
+				     struct ol_if_ops *dp_ol_if_ops);
+struct cdp_soc_t *ol_txrx_soc_attach(void *scn_handle,
+				     struct ol_if_ops *dp_ol_if_ops)
 {
 	struct cdp_soc_t *soc = qdf_mem_malloc(sizeof(struct cdp_soc_t));
 	if (!soc) {