[folks] tests: Fix format string placeholders for int64 arguments
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] tests: Fix format string placeholders for int64 arguments
- Date: Wed, 5 Jul 2017 12:58:04 +0000 (UTC)
commit 9978cf2e340d23f83ee4eb9a8284df4c669b6c55
Author: Philip Withnall <withnall endlessm com>
Date: Wed Jul 5 13:53:52 2017 +0100
tests: Fix format string placeholders for int64 arguments
%lld is not always guaranteed to be the same size as an int64, because
different architectures helpfully have a different idea of what counts
as ‘long’.
Signed-off-by: Philip Withnall <withnall endlessm com>
tests/telepathy/individual-zeitgeist.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/telepathy/individual-zeitgeist.vala b/tests/telepathy/individual-zeitgeist.vala
index 5d62942..17dc015 100644
--- a/tests/telepathy/individual-zeitgeist.vala
+++ b/tests/telepathy/individual-zeitgeist.vala
@@ -35,11 +35,11 @@ private void print_individual (Individual i)
int64 timestamp = 0;
if (new_chat_datetime != null)
timestamp = new_chat_datetime.to_unix();
- stdout.printf("\n %s\n chat interaction count: %u\n chat interaction timestamp: %lld\n", i.alias,
new_count, timestamp);
+ stdout.printf("\n %s\n chat interaction count: %u\n chat interaction timestamp: %" + int64.FORMAT
+ "\n", i.alias, new_count, timestamp);
timestamp = 0;
if (new_call_datetime != null)
timestamp = new_call_datetime.to_unix();
- stdout.printf(" call interaction count: %u\n call interaction timestamp: %lld\n", new_call_count,
timestamp);
+ stdout.printf(" call interaction count: %u\n call interaction timestamp: %" + int64.FORMAT + "\n",
new_call_count, timestamp);
}
}
@@ -62,11 +62,11 @@ public int main (string[] args)
int64 timestamp = 0;
if (chat_datetime != null)
timestamp = chat_datetime.to_unix();
- stdout.printf("\n %s\n chat interaction count: %u\n chat interaction timestamp: %lld\n",
i.alias, count, timestamp);
+ stdout.printf("\n %s\n chat interaction count: %u\n chat interaction timestamp: %" +
int64.FORMAT + "\n", i.alias, count, timestamp);
timestamp = 0;
if (call_datetime != null)
timestamp = call_datetime.to_unix();
- stdout.printf(" call interaction count: %u\n call interaction timestamp: %lld\n",
call_count, timestamp);
+ stdout.printf(" call interaction count: %u\n call interaction timestamp: %" + int64.FORMAT
+ "\n", call_count, timestamp);
}
i.notify["im-interaction-count"].connect(() => {print_individual (i);});
i.notify["call-interaction-count"].connect(() => {print_individual (i);});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]