Module: kamailio
Branch: master
Commit: 1f7a887ab461b643aa2254f5f6748628234f151e
URL: 
https://github.com/kamailio/kamailio/commit/1f7a887ab461b643aa2254f5f6748628234f151e

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2017-01-17T10:22:05+01:00

ims_isc: fix compiler warnings

* inline functions were not defined at mark.h
  so the compiler was ignoring the inline directive

> In file included from mod.c:49:0:
> mark.h:78:12: warning: inline function 'isc_mark_write_route' declared but 
> never defined
>  inline int isc_mark_write_route(struct sip_msg *msg,str *as,str *iscmark);
>             ^~~~~~~~~~~~~~~~~~~~
> mark.h:76:12: warning: inline function 'isc_mark_drop_route' declared but 
> never defined
>  inline int isc_mark_drop_route(struct sip_msg *msg);
>             ^~~~~~~~~~~~~~~~~~~
> CC (gcc) [M ims_isc.so]               third_party_reg.o
> In file included from third_party_reg.h:52:0,
>                  from third_party_reg.c:46:
> mark.h:78:12: warning: inline function 'isc_mark_write_route' declared but 
> never defined
>  inline int isc_mark_write_route(struct sip_msg *msg,str *as,str *iscmark);
>             ^~~~~~~~~~~~~~~~~~~~
> mark.h:76:12: warning: inline function 'isc_mark_drop_route' declared but 
> never defined
>  inline int isc_mark_drop_route(struct sip_msg *msg);
>             ^~~~~~~~~~~~~~~~~~~
> CC (gcc) [M ims_isc.so]               isc.o
> In file included from isc.h:54:0,
>                  from isc.c:47:
> mark.h:78:12: warning: inline function 'isc_mark_write_route' declared but 
> never defined
>  inline int isc_mark_write_route(struct sip_msg *msg,str *as,str *iscmark);
>             ^~~~~~~~~~~~~~~~~~~~
> mark.h:76:12: warning: inline function 'isc_mark_drop_route' declared but 
> never defined
>  inline int isc_mark_drop_route(struct sip_msg *msg);
>             ^~~~~~~~~~~~~~~~~~~

---

Modified: src/modules/ims_isc/mark.c
Modified: src/modules/ims_isc/mark.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/1f7a887ab461b643aa2254f5f6748628234f151e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/1f7a887ab461b643aa2254f5f6748628234f151e.patch

---

diff --git a/src/modules/ims_isc/mark.c b/src/modules/ims_isc/mark.c
index 5baa83b..8d22fff 100644
--- a/src/modules/ims_isc/mark.c
+++ b/src/modules/ims_isc/mark.c
@@ -197,7 +197,7 @@ int base16_to_bin(char *from, int len, char *to) {
  *     @param msg - SIP mesage to mark
  *     @returns 1 on success
  */
-inline int isc_mark_drop_route(struct sip_msg *msg) {
+int isc_mark_drop_route(struct sip_msg *msg) {
        struct lump* lmp, *tmp;
 
        parse_headers(msg, HDR_EOH_F, 0);
@@ -273,7 +273,7 @@ int isc_mark_set(struct sip_msg *msg, isc_match *match, 
isc_mark *mark) {
  *     @param iscmark - the mark to write
  *     @returns 1 on success, else 0
  */
-inline int isc_mark_write_route(struct sip_msg *msg, str *as, str *iscmark) {
+int isc_mark_write_route(struct sip_msg *msg, str *as, str *iscmark) {
        struct hdr_field *first;
        struct lump* anchor;
        str route;
diff --git a/src/modules/ims_isc/mark.h b/src/modules/ims_isc/mark.h
index 1031f6e..4af94a1 100644
--- a/src/modules/ims_isc/mark.h
+++ b/src/modules/ims_isc/mark.h
@@ -73,9 +73,9 @@ typedef struct _isc_mark{
 int isc_mark_get_from_msg(struct sip_msg *msg,isc_mark *mark);
 void isc_mark_get(str x,isc_mark *mark);
 int base16_to_bin(char *from,int len, char *to);
-inline int isc_mark_drop_route(struct sip_msg *msg);
+int isc_mark_drop_route(struct sip_msg *msg);
 int isc_mark_set(struct sip_msg *msg, isc_match *match, isc_mark *mark);
-inline int isc_mark_write_route(struct sip_msg *msg,str *as,str *iscmark);
+int isc_mark_write_route(struct sip_msg *msg,str *as,str *iscmark);
 int isc_mark_write_psu(struct sip_msg *msg, isc_mark *mark);
 int bin_to_base16(char *from,int len, char *to);
 


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to