GCC 4.5.1 from SUSE throws this error:
        lib/librte_pmd_enic/enic_main.c:862:2: error: value computed is not used

It seems to be a GCC bug.

Reported-by: Michael Qiu <michael.qiu at intel.com>
Suggested-by: Pawel Wodkowski <pawelx.wodkowski at intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
---
 lib/librte_pmd_enic/enic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c
index e4f43c5..8cfb6e3 100644
--- a/lib/librte_pmd_enic/enic_main.c
+++ b/lib/librte_pmd_enic/enic_main.c
@@ -858,7 +858,8 @@ static int enic_set_rsskey(struct enic *enic)
        if (!rss_key_buf_va)
                return -ENOMEM;

-       rte_memcpy(rss_key_buf_va, &rss_key, sizeof(union vnic_rss_key));
+       /* ignore return to workaround a bug seen with GCC 4.5.1 on SUSE 11 SP3 
*/
+       (void) rte_memcpy(rss_key_buf_va, &rss_key, sizeof(union vnic_rss_key));

        err = enic_set_rss_key(enic,
                rss_key_buf_pa,
-- 
2.1.3

Reply via email to