aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianyu Li <tianyu.li@arm.com>2021-07-29 13:22:04 +0800
committerDamjan Marion <dmarion@me.com>2021-11-05 19:32:27 +0000
commit2fcf7df44aa2d4a0d3be8e0fbf47dde05836ceb4 (patch)
tree3453207943056def2035e7400c0e643afc20bb11
parent51ddd38deb5866b10bbe9712ba6e8c4fb6da6381 (diff)
snort: fix unused result warning for gcc-10
make build-release CC=gcc-10 src/plugins/snort/daq_vpp.c:606:14: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 606 | (void) read (qp->enq_fd, &ctr, sizeof (ctr)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc void cast cannot suppress __attribute((warn_unused_result)), use __attribute__((unused)) instead. Type: fix Fixes: 839b1473e968 ("snort: snort3 plugin and DAQ") Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I7c7c8c2dbdc47c200b091c23ec2d992266596992
-rw-r--r--src/plugins/snort/daq_vpp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/snort/daq_vpp.c b/src/plugins/snort/daq_vpp.c
index e9d7523a986..386092a0382 100644
--- a/src/plugins/snort/daq_vpp.c
+++ b/src/plugins/snort/daq_vpp.c
@@ -628,8 +628,7 @@ vpp_daq_msg_receive (void *handle, const unsigned max_recv,
msgs += n;
n_recv += n;
}
-
- (void) read (qp->enq_fd, &ctr, sizeof (ctr));
+ ssize_t __clib_unused size = read (qp->enq_fd, &ctr, sizeof (ctr));
}
*rstat = DAQ_RSTAT_OK;