Can it be simple UNUSED? And why we can not use ODP_UNUSED here?

Maxim.

On 11/24/2014 10:19 PM, Mike Holmes wrote:
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.hol...@linaro.org>
---
  example/example_debug.h         | 5 +++++
  example/ipsec/odp_ipsec.c       | 5 +++--
  example/ipsec/odp_ipsec_cache.c | 2 +-
  example/ipsec/odp_ipsec_cache.h | 2 +-
  4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/example/example_debug.h b/example/example_debug.h
index b83667c..dd3aa7f 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 ec115fc..ad62436 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 fb53bb6..7a0c813 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 5791cf8..2cbaabd 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
  }


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to