Hi,
sua.c: In function 'rx_inact_tmr_cb': sua.c:288: warning: unused variable 'conn' sua.c: In function 'sua_rx_coref': sua.c:908: warning: unused variable 'cause' sua.c: In function 'sua_rx_codt': sua.c:1059: warning: unused variable 'cur' sua.c: In function 'sua_srv_conn_cb': sua.c:1266: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function) sua.c:1266: error: (Each undeclared identifier is reported only once sua.c:1266: error: for each function it appears in.) sua.c: In function 'sua_cli_read_cb': sua.c:1451: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function)
can we make the SCTP_SENDER_DRY_EVENT optional or is a strict requirement? If it is strict then maybe we can check for this in autoconf?
holger
On Wed, Apr 06, 2016 at 09:26:57PM +0200, Holger Freyther wrote:
Hi,
sua.c: In function 'rx_inact_tmr_cb': sua.c:288: warning: unused variable 'conn' sua.c: In function 'sua_rx_coref': sua.c:908: warning: unused variable 'cause' sua.c: In function 'sua_rx_codt': sua.c:1059: warning: unused variable 'cur' sua.c: In function 'sua_srv_conn_cb': sua.c:1266: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function) sua.c:1266: error: (Each undeclared identifier is reported only once sua.c:1266: error: for each function it appears in.) sua.c: In function 'sua_cli_read_cb': sua.c:1451: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function)
can we make the SCTP_SENDER_DRY_EVENT optional or is a strict requirement? If it is strict then maybe we can check for this in autoconf?
It's completely unnecessary, I only added logging for it. Before, it printed a notification for "32777", and we surely want to know what that's supposed to mean.
We could add a conditional define like
#ifndef SCTP_SENDER_DRY_EVENT #define SCTP_SENDER_DRY_EVENT ((1<<15)+9) #endif
because sctp.h defines the value both as enum *and* as a #define:
enum sctp_sn_type { SCTP_SN_TYPE_BASE = (1<<15), SCTP_ASSOC_CHANGE, #define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE SCTP_PEER_ADDR_CHANGE, #define SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE SCTP_SEND_FAILED, #define SCTP_SEND_FAILED SCTP_SEND_FAILED SCTP_REMOTE_ERROR, #define SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR SCTP_SHUTDOWN_EVENT, #define SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT SCTP_PARTIAL_DELIVERY_EVENT, #define SCTP_PARTIAL_DELIVERY_EVENT SCTP_PARTIAL_DELIVERY_EVENT SCTP_ADAPTATION_INDICATION, #define SCTP_ADAPTATION_INDICATION SCTP_ADAPTATION_INDICATION SCTP_AUTHENTICATION_INDICATION, #define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_INDICATION SCTP_SENDER_DRY_EVENT, #define SCTP_SENDER_DRY_EVENT SCTP_SENDER_DRY_EVENT };
Not sure though whether we should rely on this.
I could also hardcode 32777, but that's not such a good idea either.
Last resort is to not log the event and hope that all of us know what 32777 is all about.
~Neels
On 07 Apr 2016, at 01:12, Neels Hofmeyr nhofmeyr@sysmocom.de wrote:
On Wed, Apr 06, 2016 at 09:26:57PM +0200, Holger Freyther wrote:
Hi,
sua.c: In function 'rx_inact_tmr_cb': sua.c:288: warning: unused variable 'conn' sua.c: In function 'sua_rx_coref': sua.c:908: warning: unused variable 'cause' sua.c: In function 'sua_rx_codt': sua.c:1059: warning: unused variable 'cur' sua.c: In function 'sua_srv_conn_cb': sua.c:1266: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function) sua.c:1266: error: (Each undeclared identifier is reported only once sua.c:1266: error: for each function it appears in.) sua.c: In function 'sua_cli_read_cb': sua.c:1451: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this function)
can we make the SCTP_SENDER_DRY_EVENT optional or is a strict requirement? If it is strict then maybe we can check for this in autoconf?
It's completely unnecessary, I only added logging for it. Before, it printed a notification for "32777", and we surely want to know what that's supposed to mean.
We could add a conditional define like
#ifndef SCTP_SENDER_DRY_EVENT #define SCTP_SENDER_DRY_EVENT ((1<<15)+9) #endif
besides on FreeBSD it is
#define SCTP_SENDER_DRY_EVENT 0x000a
but both define it so please cover the case in a #ifdef. thanks
On 06 Apr 2016, at 15:26, Holger Freyther holger@freyther.de wrote:
Hi,
the coverity upload is now broken for a week... it is more than time to fix it!
holger
On 12 Apr 2016, at 20:36, Holger Freyther holger@freyther.de wrote:
the coverity upload is now broken for a week... it is more than time to fix it!
*sigh*
On Wed, Apr 13, 2016 at 06:39:47AM -0400, Holger Freyther wrote:
On 12 Apr 2016, at 20:36, Holger Freyther holger@freyther.de wrote: the coverity upload is now broken for a week... it is more than time to fix it!
*sigh*
Apologies, for unknown reasons I saw these mails as new only today. Probably human error from my side. I had fixed one but missed the other, as you pointed out in chat. That definitely was human error from my side.
To make up for it, I (hopefully) resolved a few coverity warnings today, as you may have noticed from the patches.
~Neels
On 14 Apr 2016, at 10:23, Neels Hofmeyr nhofmeyr@sysmocom.de wrote:
To make up for it, I (hopefully) resolved a few coverity warnings today, as you may have noticed from the patches.
thanks!