Ticket #3598: mc-3598-0012-widget-input.c-cleanup-Wcast-qual-warning.patch

File mc-3598-0012-widget-input.c-cleanup-Wcast-qual-warning.patch, 1.2 KB (added by and, 8 years ago)
  • lib/widget/input.c

    From a50d4297ab9ae0bdf103be07fdb4f312ac35b7a2 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 20 Feb 2016 15:14:12 +0000
    Subject: [PATCH] widget/input.c: cleanup -Wcast-qual warning
    
    input.c: In function 'get_history_length':
    /usr/include/glib-2.0/glib/glist.h:147:51: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
     #define g_list_previous(list)         ((list) ? (((GList *)(list))->prev) : NULL)
                                                       ^
    input.c:95:39: note: in expansion of macro 'g_list_previous'
         for (; history != NULL; history = g_list_previous (history))
                                           ^
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     lib/widget/input.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/lib/widget/input.c b/lib/widget/input.c
    index d0dc1cb..ebee3d4 100644
    a b static char *kill_buffer = NULL; 
    8888/* --------------------------------------------------------------------------------------------- */ 
    8989 
    9090static size_t 
    91 get_history_length (const GList * history) 
     91get_history_length (GList * history) 
    9292{ 
    9393    size_t len = 0; 
    9494