Wireshark-dev: Re: [Wireshark-dev] What's wrong with %ll ?
From: Pascal Quantin <[email protected]>
Date: Thu, 15 Nov 2018 22:14:55 +0100
Hi Antoine,

Le jeu. 15 nov. 2018 à 22:09, Antoine d'Otreppe <[email protected]> a écrit :
Hi devs :)

Small pickle here. Can you enlighten me? Travis clang builds complain about my format strings not using the right placeholders:

../epan/dissectors/packet-syncthing.c:156:57: error: format specifies type 'long' but the argument has type 'gint64' (aka 'long long') [-Werror,-Wformat]
        proto_item_set_text(header, "Instance ID: %li", instance_id);
                                                  ~~~   ^~~~~~~~~~~

"Well that's all fine, I can fix it", says I.
But wait, now that I put %lli, I can't commit anymore because the pre-commit hook is not happy:

$ git commit -m "Fixed more int errors"
Error: Found %ll in epan/dissectors/packet-syncthing.c

What should I do here?

While on that topic, I also need to format a guint64. What should I use for that?

Use G_GINT64_MODIFIER. See doc/README.developer for details.

Best regards,