[Home]

Summary:ASTERISK-30060: loader: format warnings in dev mode
Reporter:N A (InterLinked)Labels:
Date Opened:2022-05-13 14:41:36Date Closed:2022-05-19 20:37:18
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/General
Versions:18.6.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Debian 10, Asterisk 18.6.0Attachments:
Description:Unfortunately, I can't reproduce this on the machines I have access to the moment, but I believe the below warnings are originally from Asterisk 18.6.0 on Debian 10, developer mode.

I can't reproduce this at the moment, but the relevant code still seems to be problematic, so I'm posting this in case it's related to the ongoing gcc fixes that are going on, and this could use some attention itself:

{noformat}
loader.c: In function ‘load_modules’:
loader.c:2524:380: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘int64_t’ {aka ‘long long int’} [-Wformat=]
 ast_debug(1, "Loader time with AST_XML_DOCS: %ld.%06ld\n", usElapsed / 1000000, usElapsed % 1000000);        
loader.c:2524:380: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘int64_t’ {aka ‘long long int’} [-Wformat=]
loader.c: In function ‘load_modules’:
loader.c:2524:380: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘int64_t’ {aka ‘long long int’} [-Wformat=]
 ast_debug(1, "Loader time with AST_XML_DOCS: %ld.%06ld\n", usElapsed / 1000000, usElapsed % 1000000);
loader.c:2524:380: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘int64_t’ {aka ‘long long int’} [-Wformat=]
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2022-05-13 14:41:37.354-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2022-05-14 16:12:13.482-0500

Do you have any confirmation on the platform or environment this happened on besides believing it was Debian 10 on an old version of Asterisk 18? I'm asking because it would be nice to know for history reasons, and to ensure it's actually fixed and to know the real impact.

By: N A (InterLinked) 2022-05-14 16:21:46.129-0500

Unfortunately not. I tested on the other development systems  I use frequently and I couldn't reproduce there, so I think it must be that one; unfortunately, I don't have access to that particular system at the moment and won't for some while again. Looking at the code, I have no reason to believe it would have been resolved between 18.6 and 18.12 if an issue, but some of these gcc warnings do seem highly system dependent so there may have been something else with the environment that caused that to come up.

If this isn't actionable, feel free to close the issue; just didn't want this to get lost since other people may be seeing the same issues, and it does seem like maybe something that could have been missed in the gcc 12 fixes.

By: Joshua C. Colp (jcolp) 2022-05-14 16:28:09.143-0500

It didn't show up on the GCC 12 system, so I don't think it was really missed as a result of that.

Is it also a 64-bit system?

By: N A (InterLinked) 2022-05-17 09:01:13.445-0500

It was definitely a 64-bit system.

By: Friendly Automation (friendly-automation) 2022-05-19 20:37:20.071-0500

Change 18553 merged by Friendly Automation:
loader.c: Use portable printf conversion specifier for int64.

[https://gerrit.asterisk.org/c/asterisk/+/18553|https://gerrit.asterisk.org/c/asterisk/+/18553]

By: Friendly Automation (friendly-automation) 2022-05-19 20:40:57.382-0500

Change 18552 merged by Friendly Automation:
loader.c: Use portable printf conversion specifier for int64.

[https://gerrit.asterisk.org/c/asterisk/+/18552|https://gerrit.asterisk.org/c/asterisk/+/18552]

By: Friendly Automation (friendly-automation) 2022-05-19 20:43:06.693-0500

Change 18551 merged by Friendly Automation:
loader.c: Use portable printf conversion specifier for int64.

[https://gerrit.asterisk.org/c/asterisk/+/18551|https://gerrit.asterisk.org/c/asterisk/+/18551]

By: Friendly Automation (friendly-automation) 2022-05-19 20:43:16.553-0500

Change 18569 merged by Friendly Automation:
loader.c: Use portable printf conversion specifier for int64.

[https://gerrit.asterisk.org/c/asterisk/+/18569|https://gerrit.asterisk.org/c/asterisk/+/18569]