From c18e412f3fcc6f794cf2fdfbda0278bb2109bd15 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 31 Oct 2013 14:22:29 +0000 Subject: [PATCH 11/17] Write in C89, like telepathy-glib --- configure.ac | 3 +-- telepathy-logger/dbus-service.c | 3 ++- telepathy-logger/log-store-sqlite.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 34ca0d6..238df17 100644 --- a/configure.ac +++ b/configure.ac @@ -120,6 +120,7 @@ AM_PATH_PYTHON([2.5]) TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno], [all \ extra \ + declaration-after-statement \ format-security \ init-self \ missing-prototypes \ @@ -131,8 +132,6 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno], [missing-field-initializers \ unused-parameter]) -# declaration-after-statement is deliberately not used here - AC_ARG_ENABLE(Werror, AS_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]), werror=$enableval, werror=yes) diff --git a/telepathy-logger/dbus-service.c b/telepathy-logger/dbus-service.c index f53332e..d76b76e 100644 --- a/telepathy-logger/dbus-service.c +++ b/telepathy-logger/dbus-service.c @@ -665,12 +665,13 @@ pendingproc_remove_favourite_contact (TplActionChain *action_chain, GHashTable *contacts; gboolean removed = FALSE; GError *error = NULL; + TplDBusServicePriv *priv; g_return_if_fail (closure != NULL); g_return_if_fail (TPL_IS_DBUS_SERVICE (closure->service)); g_return_if_fail (closure->context != NULL); - TplDBusServicePriv *priv = closure->service->priv; + priv = closure->service->priv; if (!tp_dbus_check_valid_object_path (closure->account, &error)) { diff --git a/telepathy-logger/log-store-sqlite.c b/telepathy-logger/log-store-sqlite.c index bd86340..c0b00dc 100644 --- a/telepathy-logger/log-store-sqlite.c +++ b/telepathy-logger/log-store-sqlite.c @@ -884,7 +884,7 @@ _tpl_log_store_sqlite_get_most_recent (TplLogStoreSqlite *self, TplLogStoreSqlitePrivate *priv = TPL_LOG_STORE_SQLITE (self)->priv; sqlite3_stmt *sql = NULL; int e; - gint64 date = -1;; + gint64 date = -1; const char *account_name; account_name = get_account_name (account); -- 1.8.4.rc3