[sr-dev] git:master:007bd7e0: cdp: fix compilation warning

Victor Seva linuxmaniac at torreviejawireless.org
Tue Jun 7 12:19:50 CEST 2016


Module: kamailio
Branch: master
Commit: 007bd7e0c874f25ff73bfd36bd210b0fed2bac7a
URL: https://github.com/kamailio/kamailio/commit/007bd7e0c874f25ff73bfd36bd210b0fed2bac7a

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2016-06-06T12:05:39+02:00

cdp: fix compilation warning

> peerstatemachine.c:97:19: warning: implicit conversion from enumeration type 'peer_state_t' to different enumeration type 'peer_event_t' [-Wenum-conversion]
>                                         next_event = I_Snd_Conn_Req(p);
>                                                    ~ ^~~~~~~~~~~~~~~~~
> peerstatemachine.c:531:10: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion]
>                 return I_Rcv_Conn_NAck;
>                 ~~~~~~ ^~~~~~~~~~~~~~~
> peerstatemachine.c:534:9: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion]
>         return I_Rcv_Conn_Ack;
>         ~~~~~~ ^~~~~~~~~~~~~~
> 3 warnings generated.

---

Modified: modules/cdp/peerstatemachine.c
Modified: modules/cdp/peerstatemachine.h

---

Diff:  https://github.com/kamailio/kamailio/commit/007bd7e0c874f25ff73bfd36bd210b0fed2bac7a.diff
Patch: https://github.com/kamailio/kamailio/commit/007bd7e0c874f25ff73bfd36bd210b0fed2bac7a.patch

---

diff --git a/modules/cdp/peerstatemachine.c b/modules/cdp/peerstatemachine.c
index b5e6dd7..c69cc99 100644
--- a/modules/cdp/peerstatemachine.c
+++ b/modules/cdp/peerstatemachine.c
@@ -519,7 +519,7 @@ int sm_process(peer *p,peer_event_t event,AAAMessage *msg,int peer_locked,int so
  * @param p - peer to send to
  * @returns the new state for the peer
  */
-peer_state_t I_Snd_Conn_Req(peer *p)
+peer_event_t I_Snd_Conn_Req(peer *p)
 {
 	LM_INFO("I_Snd_Conn_Req(): Peer %.*s \n",
 			p->fqdn.len,p->fqdn.s);
diff --git a/modules/cdp/peerstatemachine.h b/modules/cdp/peerstatemachine.h
index 47d93f8..4b9ef8a 100644
--- a/modules/cdp/peerstatemachine.h
+++ b/modules/cdp/peerstatemachine.h
@@ -50,7 +50,7 @@
 
 int sm_process(peer *p,peer_event_t event,AAAMessage *msg,int peer_locked,int sock);
 
-peer_state_t I_Snd_Conn_Req(peer *p);
+peer_event_t I_Snd_Conn_Req(peer *p);
 void Cleanup(peer *p,int sock);
 void Error(peer *p, int sock);
 void I_Snd_CER(peer *p);




More information about the sr-dev mailing list