[Asterisk-code-review] addons/res_config_mysql: silense warnings about printf format errors. (asterisk[master])

Jaco Kroon asteriskteam at digium.com
Sun Feb 23 03:07:36 CST 2020


Jaco Kroon has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13816 )

Change subject: addons/res_config_mysql: silense warnings about printf format errors.
......................................................................


Patch Set 3:

> Patch Set 2:
> 
> Would be cleaner to change the printf to use PRIu64 instead of %llu rather than cast, but you'll need to test against older versions of the mysqlclient library to confirm.

Updated.

The intention is clearly for this to be a 64-bit int, and the headers define my_ulonglong as uint64_t, as such PRIu64 is the correct move.

As for older libraries ... unfortunately I don't have at hand any more.  From the mysql documentation (https://dev.mysql.com/doc/refman/8.0/en/c-api-data-structures.html):

A type used for 64-bit unsigned integers. The my_ulonglong type was used before MySQL 8.0.18. As of MySQL 8.0.18, use the uint64_t C type instead.

So I do trust that this should be in order.


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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I2af4d419a37c1a7eeee750cf9ae4a9a2b3a37fd3
Gerrit-Change-Number: 13816
Gerrit-PatchSet: 3
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Sun, 23 Feb 2020 09:07:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200223/65e2e4eb/attachment.html>


More information about the asterisk-code-review mailing list