aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2014-11-24 14:19:31 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-11-26 14:56:04 +0300
commit25cac3b6138678b2c8cfc6edd650d406164cfa32 (patch)
treefad3a3923b38f0ebaf04d4ac9a7de9d7dd4d5bb6 /example
parente0411a3f3c0af88c23eb3254e56f3dd4e4f5efdb (diff)
examples: remove the use of ODP_UNUSED
ODP_UNUSED should be used internally to an ODP implementation and not by an application. The declaration should never have specified ODP_UNUSED for find_ipsec_cache_entry_out() Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/example_debug.h5
-rw-r--r--example/ipsec/odp_ipsec.c5
-rw-r--r--example/ipsec/odp_ipsec_cache.c2
-rw-r--r--example/ipsec/odp_ipsec_cache.h2
4 files changed, 10 insertions, 4 deletions
diff --git a/example/example_debug.h b/example/example_debug.h
index b83667c53..dd3aa7f3d 100644
--- a/example/example_debug.h
+++ b/example/example_debug.h
@@ -78,6 +78,11 @@ do { \
EXAMPLE_LOG(EXAMPLE_LOG_ABORT, fmt, ##__VA_ARGS__)
/**
+ * Intentionally unused variables to functions
+ */
+#define EXAMPLE_UNUSED __attribute__((__unused__))
+
+/**
* @}
*/
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index ec115fc39..ad6243604 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -619,7 +619,8 @@ void initialize_intf(char *intf)
* @return PKT_CONTINUE if good, supported packet else PKT_DROP
*/
static
-pkt_disposition_e do_input_verify(odp_packet_t pkt, pkt_ctx_t *ctx ODP_UNUSED)
+pkt_disposition_e do_input_verify(odp_packet_t pkt,
+ pkt_ctx_t *ctx EXAMPLE_UNUSED)
{
if (odp_unlikely(odp_packet_error(pkt)))
return PKT_DROP;
@@ -1037,7 +1038,7 @@ pkt_disposition_e do_ipsec_out_finish(odp_packet_t pkt,
* @return NULL (should never return)
*/
static
-void *pktio_thread(void *arg ODP_UNUSED)
+void *pktio_thread(void *arg EXAMPLE_UNUSED)
{
int thr;
odp_packet_t pkt;
diff --git a/example/ipsec/odp_ipsec_cache.c b/example/ipsec/odp_ipsec_cache.c
index fb53bb631..7a0c81350 100644
--- a/example/ipsec/odp_ipsec_cache.c
+++ b/example/ipsec/odp_ipsec_cache.c
@@ -171,7 +171,7 @@ ipsec_cache_entry_t *find_ipsec_cache_entry_in(uint32_t src_ip,
ipsec_cache_entry_t *find_ipsec_cache_entry_out(uint32_t src_ip,
uint32_t dst_ip,
- uint8_t proto ODP_UNUSED)
+ uint8_t proto EXAMPLE_UNUSED)
{
ipsec_cache_entry_t *entry = ipsec_cache->out_list;
diff --git a/example/ipsec/odp_ipsec_cache.h b/example/ipsec/odp_ipsec_cache.h
index 5791cf8f3..2cbaabd1a 100644
--- a/example/ipsec/odp_ipsec_cache.h
+++ b/example/ipsec/odp_ipsec_cache.h
@@ -118,7 +118,7 @@ ipsec_cache_entry_t *find_ipsec_cache_entry_in(uint32_t src_ip,
*/
ipsec_cache_entry_t *find_ipsec_cache_entry_out(uint32_t src_ip,
uint32_t dst_ip,
- uint8_t proto ODP_UNUSED);
+ uint8_t proto);
#ifdef __cplusplus
}