[Asterisk-code-review] res_prometheus: Optional load res_pjsip_outbound_registration.so (asterisk[18])

Boris P. Korzun asteriskteam at digium.com
Fri Jun 24 03:45:07 CDT 2022


Attention is currently required from: Joshua Colp.
Boris P. Korzun has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18614 )

Change subject: res_prometheus: Optional load res_pjsip_outbound_registration.so
......................................................................


Patch Set 2:

(1 comment)

File res/res_prometheus.c:

https://gerrit.asterisk.org/c/asterisk/+/18614/comment/086bb1ae_5271fa9d 
PS1, Line 981: 		if (pjsip_outbound_registration_metrics_init())
> I don't think this is truly sufficient. […]
I've tried to use an optional API, but faced a warning:

```
prometheus/pjsip_outbound_registrations.c:342:5: warning: no previous prototype for function '__pjsip_outbound_registration_metrics_init' [-Wmissing-prototypes]
int AST_OPTIONAL_API_NAME(pjsip_outbound_registration_metrics_init)(void)
    ^
/wrkdirs/usr/ports/net/asterisk18/work/asterisk-18.13.0/include/asterisk/optional_api.h:175:37: note: expanded from macro 'AST_OPTIONAL_API_NAME'
#define AST_OPTIONAL_API_NAME(name) __##name
                                    ^
<scratch space>:74:1: note: expanded from here
__pjsip_outbound_registration_metrics_init
^
prometheus/pjsip_outbound_registrations.c:342:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int AST_OPTIONAL_API_NAME(pjsip_outbound_registration_metrics_init)(void)
^
static 
1 warning generated.
```

Can you help me to avoid the warning?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18614
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ia34f1684d984e821fbdd4de8911f930337703666
Gerrit-Change-Number: 18614
Gerrit-PatchSet: 2
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Petersen <asterisk.org at zombie.dk>
Gerrit-Reviewer: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Fri, 24 Jun 2022 08:45:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220624/9f2afcf0/attachment-0001.html>


More information about the asterisk-code-review mailing list