Re: [EXTERNAL] [vpp-dev] why define an unused var

2020-07-12 Thread 远志
@Chris,@Dave, Thanks for the explanation, and thanks for the suggestion. ---Original--- From: "Chris Luke"-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16939): https://lists.fd.io/g/vpp-dev/message/16939 Mute This Topic: https://lists.fd.io/mt

Re: [vpp-dev] why define an unused var

2020-07-11 Thread Dave Barach via lists.fd.io
020 4:48 AM To: vpp-dev Subject: [vpp-dev] why define an unused var hi there, i'm reading vpp code, and confused with this code: int rv __attribute__ ((unused)) = write (2, "Main heap allocation failure!\r\n", 31); why it define a var named rv, but never used, what d

Re: [EXTERNAL] [vpp-dev] why define an unused var

2020-07-11 Thread Chris Luke
big deal really if it’s done the way you show. It’s likely this came about incrementally in the code. Chris. From: vpp-dev@lists.fd.io On Behalf Of "?? Sent: Saturday, July 11, 2020 04:48 To: vpp-dev Subject: [EXTERNAL] [vpp-dev] why define an unused var hi there, i'm reading vpp

[vpp-dev] why define an unused var

2020-07-11 Thread 远志
hi there,  i'm reading vpp code,  and confused with this code: int rv __attribute__ ((unused)) = write (2, "Main heap allocation failure!\r\n", 31); why it define a var named rv, but never used, what dose this var mean to? git:stable/1609 vpp/vnet/main.c:264-=-=-=-=-=-=-=-=-=-=-=- Links: You