Remove a set but not used warning showing up in usrsctp.

This commit is contained in:
Michael Tuexen 2018-08-14 08:32:33 +00:00
parent 62484790e0
commit 0f1346f7f4

View File

@ -3231,7 +3231,6 @@ static void
sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSED, sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSED,
struct sctp_tcb *stcb, struct sctp_nets *net) struct sctp_tcb *stcb, struct sctp_nets *net)
{ {
struct sctp_association *asoc;
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so; struct socket *so;
#endif #endif
@ -3241,7 +3240,6 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSE
if (stcb == NULL) if (stcb == NULL)
return; return;
asoc = &stcb->asoc;
/* process according to association state */ /* process according to association state */
if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_ACK_SENT) { if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_ACK_SENT) {
/* unexpected SHUTDOWN-COMPLETE... so ignore... */ /* unexpected SHUTDOWN-COMPLETE... so ignore... */
@ -3255,8 +3253,8 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSE
sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
} }
#ifdef INVARIANTS #ifdef INVARIANTS
if (!TAILQ_EMPTY(&asoc->send_queue) || if (!TAILQ_EMPTY(&stcb->asoc.send_queue) ||
!TAILQ_EMPTY(&asoc->sent_queue) || !TAILQ_EMPTY(&stcb->asoc.sent_queue) ||
sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED)) { sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED)) {
panic("Queues are not empty when handling SHUTDOWN-COMPLETE"); panic("Queues are not empty when handling SHUTDOWN-COMPLETE");
} }