Parameter ldpfec isn't used in function mplsLdpFecEncodingLength(), and
this may trigger a compiler warning. To reproduce this warning, please
run

./configure --enable-Werror CFLAGS="-Wunused-parameter" && make

The problem was originally discovered with CLANG 21.1.6 and later
reproduced with GCC 15.2.1. It's probably possible to reproduce it with
older versions of the compilers as well.

Signed-off-by: Dmitry Mityugov <[email protected]>
---
Fixed a "line to long" message from the robot in this version of the
patch, using clang-format.

 lib/sflow_receiver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/sflow_receiver.c b/lib/sflow_receiver.c
index 3c5aec897..f5e6dbab5 100644
--- a/lib/sflow_receiver.c
+++ b/lib/sflow_receiver.c
@@ -387,7 +387,8 @@ inline static void putMplsLdpFec(SFLReceiver *receiver, 
SFLExtended_mpls_LDP_FEC
     putNet32(receiver, ldpfec->mplsFecAddrPrefixLength);
 }
 
-inline static u_int32_t mplsLdpFecEncodingLength(SFLExtended_mpls_LDP_FEC 
*ldpfec) {
+inline static u_int32_t
+mplsLdpFecEncodingLength(SFLExtended_mpls_LDP_FEC *ldpfec OVS_UNUSED) {
     return 4;
 }
 
-- 
2.52.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to