[Asterisk-code-review] tests: Fix compilation errors. (asterisk[master])

N A asteriskteam at digium.com
Sun Oct 23 10:25:47 CDT 2022


N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/19418 )

Change subject: tests: Fix compilation errors.
......................................................................


Patch Set 2:

(1 comment)

Patchset:

PS2: 
Okay, so this is odd:

00:02:31.294  test_stasis.c: In function 'dump_consumer':
00:02:31.294  test_stasis.c:2198:2: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t' [-Werror=format=]
00:02:31.294    ast_test_status_update(test, "Messages received: %u  Final? %s\n", cts->consumer->messages_rxed_len,
00:02:31.294    ^
00:02:31.294  cc1: all warnings being treated as errors

But on my machine:

   [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

I guess size_t is a different type on each machine so maybe it's not one size fits all here.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I363e6057ef84d54b88af80d23ad6147eef9216ee
Gerrit-Change-Number: 19418
Gerrit-PatchSet: 2
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Comment-Date: Sun, 23 Oct 2022 15:25:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221023/c413f7de/attachment.html>


More information about the asterisk-code-review mailing list