[Home]

Summary:ASTERISK-30273: test_mwi: compilation fails on 32-bit Debian
Reporter:N A (InterLinked)Labels:
Date Opened:2022-10-22 18:36:17Date Closed:2022-10-28 06:45:15
Priority:MinorRegression?
Status:Closed/CompleteComponents:Tests/Portability
Versions:20.0.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Linux debian 4.19.0-22-686-pae #1 SMP Debian 4.19.260-1 (2022-09-29) i686 GNU/LinuxAttachments:
Description:Compilation fails:

{noformat}
  [CCi] test_mwi.i -> test_mwi.o
test_mwi.c: In function ‘mailbox_to_num’:
test_mwi.c:73:27: error: passing argument 2 of ‘ast_str_to_umax’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 if (ast_str_to_umax(++p, num)) {
                          ^~~
In file included from test_mwi.c:27:
/usr/src/asterisk-20.0.0/include/asterisk/conversions.h:134:49: note: expected ‘uintmax_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}
int ast_str_to_umax(const char *str, uintmax_t *res);
                                     ~~~~~~~~~~~^~~
  [CCi] test_cdr.i -> test_cdr.o
  [CCi] test_res_prometheus.i -> test_res_prometheus.o
{noformat}

Also:
{noformat}
  [CCi] test_stasis.i -> test_stasis.o
test_stasis.c: In function ‘dump_consumer’:
test_stasis.c:2198:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
 ast_test_status_update(test, "Messages received: %ld  Final? %s\n", cts->consumer->messages_rxed_len,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [/usr/src/asterisk-20.0.0/Makefile.rules:150: test_stasis.o] Error 1
{noformat}

Also:
{noformat}
make[1]: Leaving directory '/usr/src/asterisk-20.0.0/menuselect'
  [CCi] test_stasis_state.i -> test_stasis_state.o
test_stasis_state.c: In function ‘create_foo_type_message’:
test_stasis_state.c:259:26: error: passing argument 2 of ‘ast_str_to_umax’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 if (ast_str_to_umax(id, &foo->bar)) {
                         ^~~~~~~~~
In file included from test_stasis_state.c:27:
/usr/src/asterisk-20.0.0/include/asterisk/conversions.h:134:49: note: expected ‘uintmax_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}
int ast_str_to_umax(const char *str, uintmax_t *res);
                                     ~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
make[1]: *** [/usr/src/asterisk-20.0.0/Makefile.rule
{noformat}


Outside of the tests:
{noformat}
  [CCi] res_pjsip_outbound_authenticator_digest.i -> res_pjsip_outbound_authenticator_digest.o
res_pjsip_outbound_authenticator_digest.c: In function ‘set_outbound_authentication_credentials’:
res_pjsip_outbound_authenticator_digest.c:387:474: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
  ast_debug(3, "Set %"PRIu64" credentials in auth session\n", cred_count);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
res_pjsip_outbound_authenticator_digest.c:389:78: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
  ast_log(LOG_ERROR, "Failed to set %"PRIu64" credentials in auth session\n", cred_count);
                                                                             ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [/usr/src/asterisk-20.0.0/Makefile.rules:150: res_pjsip_outbound_authenticator_digest.o] Error 1
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2022-10-22 18:36:20.663-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: Friendly Automation (friendly-automation) 2022-10-28 06:45:17.789-0500

Change 19418 merged by Friendly Automation:
tests: Fix compilation errors on 32-bit.

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

By: Friendly Automation (friendly-automation) 2022-10-28 06:45:21.333-0500

Change 19503 merged by Friendly Automation:
tests: Fix compilation errors on 32-bit.

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

By: Friendly Automation (friendly-automation) 2022-10-28 07:40:22.360-0500

Change 19502 merged by Joshua Colp:
tests: Fix compilation errors on 32-bit.

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

By: Friendly Automation (friendly-automation) 2022-10-28 07:41:07.476-0500

Change 19501 merged by Joshua Colp:
tests: Fix compilation errors on 32-bit.

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