Module: kamailio
Branch: master
Commit: 7dcc8405ccec19132d27516426137e35e464d4ad
URL:
https://github.com/kamailio/kamailio/commit/7dcc8405ccec19132d27516426137e3…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T13:23:08+02:00
ims_usrloc_pcscf: fix warnings deprecated-non-prototype
In file included from pcontact.c:46:
Warning: ./pcontact.h:63:5: warning: a function declaration without a prototype is
deprecated in all versions of C and is treated as a zero-parameter prototype in C2x,
conflicting with a subsequent definition [-Wdeprecated-non-prototype]
int new_pcontact(
^
pcontact.c:166:5: note: conflicting prototype is here
int new_pcontact(struct udomain *_d, str *_contact, struct pcontact_info *_ci,
^
1 warning generated.
Warning: udomain.c:232:17: warning: passing arguments
to 'new_pcontact' without a prototype is deprecated in all versions of C and is
not supported in C2x [-Wdeprecated-non-prototype]
if(new_pcontact(_d->name, _contact, _ci, _c) < 0) {
^
1 warning generated.
---
Modified: src/modules/ims_usrloc_pcscf/pcontact.c
Modified: src/modules/ims_usrloc_pcscf/pcontact.h
Modified: src/modules/ims_usrloc_pcscf/udomain.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7dcc8405ccec19132d27516426137e3…
Patch:
https://github.com/kamailio/kamailio/commit/7dcc8405ccec19132d27516426137e3…
---
diff --git a/src/modules/ims_usrloc_pcscf/pcontact.c
b/src/modules/ims_usrloc_pcscf/pcontact.c
index 76e061fe529..a885cd285e7 100644
--- a/src/modules/ims_usrloc_pcscf/pcontact.c
+++ b/src/modules/ims_usrloc_pcscf/pcontact.c
@@ -192,7 +192,7 @@ int new_pcontact(struct udomain *_d, str *_contact, struct
pcontact_info *_ci,
memcpy(p, _contact->s, _contact->len);
p += _contact->len;
(*_c)->aor.len = _contact->len;
- (*_c)->domain = (str *)_d;
+ (*_c)->domain = _d->name;
if(parse_uri((*_c)->aor.s, (*_c)->aor.len, &sip_uri) != 0) {
LM_ERR("unable to determine contact host from uri [%.*s\n",
diff --git a/src/modules/ims_usrloc_pcscf/pcontact.h
b/src/modules/ims_usrloc_pcscf/pcontact.h
index f1c130f4470..6f45d5aace2 100644
--- a/src/modules/ims_usrloc_pcscf/pcontact.h
+++ b/src/modules/ims_usrloc_pcscf/pcontact.h
@@ -60,8 +60,8 @@ void insert_ppublic(struct pcontact *_c, ppublic_t *_p);
int new_ppublic(str *public_identity, int is_default, ppublic_t **_p);
void free_ppublic(ppublic_t *_p);
-int new_pcontact(
- /*str* _dom, str* public_identity, int reg_state, int barring, ims_subscription** s,
str* ccf1, str* ccf2, str* ecf1, str* ecf2, impurecord_t** _r*/);
+int new_pcontact(struct udomain *_d, str *_contact, struct pcontact_info *_ci,
+ struct pcontact **_c);
void free_pcontact(pcontact_t *_c);
void print_pcontact(FILE *_f, pcontact_t *_r);
ppublic_t *mem_insert_ppublic(
diff --git a/src/modules/ims_usrloc_pcscf/udomain.c
b/src/modules/ims_usrloc_pcscf/udomain.c
index 248684cb00b..27158128d13 100644
--- a/src/modules/ims_usrloc_pcscf/udomain.c
+++ b/src/modules/ims_usrloc_pcscf/udomain.c
@@ -229,7 +229,7 @@ int mem_insert_pcontact(struct udomain *_d, str *_contact,
{
int sl;
- if(new_pcontact(_d->name, _contact, _ci, _c) < 0) {
+ if(new_pcontact(_d, _contact, _ci, _c) < 0) {
LM_ERR("creating pcontact failed\n");
return -1;
}