[v2] eal/bsd: fix unused parameters compile error

Message ID 0966156afeda985c9a434f24b6b555d1963c6bb5.1537446247.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Headers
Series [v2] eal/bsd: fix unused parameters compile error |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Anatoly Burakov Sept. 20, 2018, 12:26 p.m. UTC
  When compiling on FreeBSD, lots of warnings/errors are thrown for
unused parameter. Fix these by marking the parameters as unused
in the code.

Fixes: 1009ba1704f9 ("mem: add internal API to get and set segment fd")
Fixes: 3a44687139eb ("mem: allow querying offset into segment fd")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---

Notes:
    v2:
    - Added missing Fixes tag
    - Reworded commit message

 lib/librte_eal/bsdapp/eal/eal_memalloc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
  

Comments

Thomas Monjalon Sept. 20, 2018, 12:58 p.m. UTC | #1
20/09/2018 14:26, Anatoly Burakov:
> When compiling on FreeBSD, lots of warnings/errors are thrown for
> unused parameter. Fix these by marking the parameters as unused
> in the code.
> 
> Fixes: 1009ba1704f9 ("mem: add internal API to get and set segment fd")
> Fixes: 3a44687139eb ("mem: allow querying offset into segment fd")
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/bsdapp/eal/eal_memalloc.c b/lib/librte_eal/bsdapp/eal/eal_memalloc.c
index 06afbcc99..a5847f0bd 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memalloc.c
@@ -49,19 +49,21 @@  eal_memalloc_sync_with_primary(void)
 }
 
 int
-eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
+eal_memalloc_get_seg_fd(int list_idx __rte_unused, int seg_idx __rte_unused)
 {
 	return -ENOTSUP;
 }
 
 int
-eal_memalloc_set_seg_fd(int list_idx, int seg_idx, int fd)
+eal_memalloc_set_seg_fd(int list_idx __rte_unused, int seg_idx __rte_unused,
+		int fd __rte_unused)
 {
 	return -ENOTSUP;
 }
 
 int
-eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
+eal_memalloc_get_seg_fd_offset(int list_idx __rte_unused,
+		int seg_idx __rte_unused, size_t *offset __rte_unused)
 {
 	return -ENOTSUP;
 }