From e4badcf7bc861de1a96bb9b29608792cc8dde60d Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sat, 28 May 2016 09:40:49 +0000 Subject: [PATCH] (mc_search_set_error): cleanup compile warning on older gcc compilers: search.c: In function 'mc_search_set_error': search.c:497:36: error: declaration of 'mc_search' shadows a global declaration [-Werror=shadow] search.c:419:1: error: shadowed declaration is here [-Werror=shadow] Signed-off-by: Andreas Mohr Signed-off-by: Andrew Borodin --- lib/search.h | 2 +- lib/search/search.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/search.h b/lib/search.h index 1c246c354..6e79609bc 100644 --- a/lib/search.h +++ b/lib/search.h @@ -168,7 +168,7 @@ int mc_search_getstart_result_by_num (mc_search_t *, int); int mc_search_getend_result_by_num (mc_search_t *, int); /* *INDENT-OFF* */ -void mc_search_set_error (mc_search_t * mc_search, mc_search_error_t code, const gchar * format, ...) +void mc_search_set_error (mc_search_t * lc_mc_search, mc_search_error_t code, const gchar * format, ...) G_GNUC_PRINTF (3, 4); /* *INDENT-ON* */ diff --git a/lib/search/search.c b/lib/search/search.c index af33b7392..7190fa9d1 100644 --- a/lib/search/search.c +++ b/lib/search/search.c @@ -494,18 +494,18 @@ mc_search_getend_result_by_num (mc_search_t * lc_mc_search, int lc_index) */ void -mc_search_set_error (mc_search_t * mc_search, mc_search_error_t code, const gchar * format, ...) +mc_search_set_error (mc_search_t * lc_mc_search, mc_search_error_t code, const gchar * format, ...) { - mc_search->error = code; + lc_mc_search->error = code; - MC_PTR_FREE (mc_search->error_str); + MC_PTR_FREE (lc_mc_search->error_str); if (format != NULL) { va_list args; va_start (args, format); - mc_search->error_str = g_strdup_vprintf (format, args); + lc_mc_search->error_str = g_strdup_vprintf (format, args); va_end (args); } }