From: Lucas De Marchi Date: Wed, 4 Dec 2013 19:58:15 +0000 (-0200) Subject: Fix warnings on 64 bits X-Git-Tag: accepted/tizen/generic/20140106.140339~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a899da6d178af550e380477182e447bebce77ff0;p=platform%2Fupstream%2Flightmediascanner.git Fix warnings on 64 bits Use the glib-provided macros to print 64 bit values. lightmediascannerd.c:212:9: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘gint64’ [-Wformat=] g_warning("Couldn't bind delete old dtime '%lld'from %s: %s", lightmediascannerctl.c:280:16: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64’ [-Wformat=] category, path, uptodate, processed, deleted, skipped, errors); --- diff --git a/src/bin/lightmediascannerctl.c b/src/bin/lightmediascannerctl.c index b2e002d..8931f33 100644 --- a/src/bin/lightmediascannerctl.c +++ b/src/bin/lightmediascannerctl.c @@ -275,8 +275,9 @@ on_signal(GDBusProxy *proxy, gchar *sender, gchar *signal, GVariant *params, gpo &skipped, &errors); - printf("Scan Progress %s:%s uptodate=%llu, processed=%llu, " - "deleted=%llu, skipped=%llu, errors=%llu\n", + printf("Scan Progress %s:%s uptodate=%"G_GUINT64_FORMAT", " + "processed=%"G_GUINT64_FORMAT", deleted=%"G_GUINT64_FORMAT", " + "skipped=%"G_GUINT64_FORMAT", errors=%"G_GUINT64_FORMAT"\n", category, path, uptodate, processed, deleted, skipped, errors); } } diff --git a/src/bin/lightmediascannerd.c b/src/bin/lightmediascannerd.c index a28f35e..96d1137 100644 --- a/src/bin/lightmediascannerd.c +++ b/src/bin/lightmediascannerd.c @@ -209,15 +209,15 @@ do_delete_old(void) dtime = (gint64)time(NULL) - delete_older_than * (24 * 60 * 60); if (sqlite3_bind_int64(stmt, 1, dtime) != SQLITE_OK) { - g_warning("Couldn't bind delete old dtime '%lld'from %s: %s", - dtime, db_path, sqlite3_errmsg(db)); + g_warning("Couldn't bind delete old dtime '%"G_GINT64_FORMAT + "'from %s: %s", dtime, db_path, sqlite3_errmsg(db)); goto cleanup; } ret = sqlite3_step(stmt); if (ret != SQLITE_DONE) - g_warning("Couldn't run SQL delete old dtime '%lld', ret=%d: %s", - dtime, ret, sqlite3_errmsg(db)); + g_warning("Couldn't run SQL delete old dtime '%"G_GINT64_FORMAT + "', ret=%d: %s", dtime, ret, sqlite3_errmsg(db)); cleanup: sqlite3_reset(stmt);