diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2017-03-11 23:55:25 +0000 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2017-03-21 22:50:00 +0000 |
commit | 91f58cb13fbe518a932022ddef8c62a048bf784b (patch) | |
tree | df37eb428155ade3b44feb34bff744927d2d7da2 /src/libtracker-sparql | |
parent | 823d660da10415549078e5020b2c35c7461b3be6 (diff) | |
download | tracker-91f58cb13fbe518a932022ddef8c62a048bf784b.tar.gz |
libtracker-sparql: Use correct printf format specifiers for gint64
Sadly the correct format is different on 32bit and 64bit systems so we
have to use the unweildy G_GINT64_FORMAT macro.
Diffstat (limited to 'src/libtracker-sparql')
-rw-r--r-- | src/libtracker-sparql/tracker-notifier.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index e448e7981..4b036c785 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -433,7 +433,7 @@ create_extra_info_query (TrackerNotifier *notifier, if (has_elements) g_string_append_c (filter, ','); - g_string_append_printf (filter, "%ld", event->id); + g_string_append_printf (filter, "%" G_GINT64_FORMAT "d", event->id); has_elements = TRUE; } @@ -489,8 +489,8 @@ tracker_notifier_query_extra_info (TrackerNotifier *notifier, event = find_event_in_array (events, id, &idx); if (!event) { - g_critical ("Queried for id %ld but it is not found, " - "bailing out", id); + g_critical ("Queried for id %" G_GINT64_FORMAT "d but it is not " + "found, bailing out", id); break; } @@ -522,7 +522,8 @@ create_extra_deleted_info_query (TrackerNotifier *notifier, if (event->type != TRACKER_NOTIFIER_EVENT_DELETE) continue; - g_string_append_printf (sparql, "%ld tracker:uri(%ld) ", + g_string_append_printf (sparql, "%" G_GINT64_FORMAT "d " + "tracker:uri(%" G_GINT64_FORMAT "d)", event->id, event->id); has_elements = TRUE; } @@ -572,8 +573,8 @@ tracker_notifier_query_extra_deleted_info (TrackerNotifier *notifier, event = find_event_in_array (events, id, &idx); if (!event) { - g_critical ("Queried for id %ld in column %d but it " - "is not found, bailing out", id, col); + g_critical ("Queried for id %" G_GINT64_FORMAT "d in column %d " + "but it is not found, bailing out", id, col); break; } |