Selaa lähdekoodia

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.

(cherry picked from commit 7dcc8405ccec19132d27516426137e35e464d4ad)
Victor Seva 11 kuukautta sitten
vanhempi
commit
b55acf4ce7

+ 1 - 1
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",

+ 2 - 2
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(

+ 1 - 1
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;
 	}