From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pawel Wodkowski Subject: [PATCH 1/5] rte_timer: fix invalid declaration of rte_timer_cb_t Date: Mon, 23 Feb 2015 15:09:56 +0100 Message-ID: <1424700600-1765-2-git-send-email-pawelx.wodkowski@intel.com> References: <1424700600-1765-1-git-send-email-pawelx.wodkowski@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1424700600-1765-1-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Declaration for function pointer should be typedef ret_type (*type_name)(args...) not typedef ret_type (type_name)(args...) although compiler treat both of them the same, the static analysis tool like klocwork complain about that. Signed-off-by: Pawel Wodkowski --- lib/librte_timer/rte_timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h index 4907cf5..327fe4b 100644 --- a/lib/librte_timer/rte_timer.h +++ b/lib/librte_timer/rte_timer.h @@ -115,7 +115,7 @@ struct rte_timer; /** * Callback function type for timer expiry. */ -typedef void (rte_timer_cb_t)(struct rte_timer *, void *); +typedef void (*rte_timer_cb_t)(struct rte_timer *, void *); #define MAX_SKIPLIST_DEPTH 10 @@ -128,7 +128,7 @@ struct rte_timer struct rte_timer *sl_next[MAX_SKIPLIST_DEPTH]; volatile union rte_timer_status status; /**< Status of timer. */ uint64_t period; /**< Period of timer (0 if not periodic). */ - rte_timer_cb_t *f; /**< Callback function. */ + rte_timer_cb_t f; /**< Callback function. */ void *arg; /**< Argument to callback function. */ }; -- 1.9.1