Ticket #3641: mc-3641-cleanup-compile-warning-for-mc_search.patch

File mc-3641-cleanup-compile-warning-for-mc_search.patch, 1.4 KB (added by and, 8 years ago)
  • lib/search/search.c

    From 2eff1510fcf396db976dfb7078b47818c90301b0 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 28 May 2016 09:40:49 +0000
    Subject: [PATCH] Cleanup compile warning on older gcc compilers
    
    Cleanup compile error 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 <and@gmx.li>
    ---
     lib/search/search.c | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/lib/search/search.c b/lib/search/search.c
    index af33b73..7190fa9 100644
    a b mc_search_getend_result_by_num (mc_search_t * lc_mc_search, int lc_index) 
    494494 */ 
    495495 
    496496void 
    497 mc_search_set_error (mc_search_t * mc_search, mc_search_error_t code, const gchar * format, ...) 
     497mc_search_set_error (mc_search_t * lc_mc_search, mc_search_error_t code, const gchar * format, ...) 
    498498{ 
    499     mc_search->error = code; 
     499    lc_mc_search->error = code; 
    500500 
    501     MC_PTR_FREE (mc_search->error_str); 
     501    MC_PTR_FREE (lc_mc_search->error_str); 
    502502 
    503503    if (format != NULL) 
    504504    { 
    505505        va_list args; 
    506506 
    507507        va_start (args, format); 
    508         mc_search->error_str = g_strdup_vprintf (format, args); 
     508        lc_mc_search->error_str = g_strdup_vprintf (format, args); 
    509509        va_end (args); 
    510510    } 
    511511}