Ticket #4426: mc-4426-fix-implicit-function-declaration-warning.patch

File mc-4426-fix-implicit-function-declaration-warning.patch, 1.1 KB (added by and, 14 months ago)
  • src/editor/spell.c

    From 7562f0b671d8353257374486fc5ccd0d590b75f1 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Fri, 3 Mar 2023 13:15:48 +0000
    Subject: [PATCH] (spell.c): fix Wimplicit-function-declaration warning
    
    spell.c:308:9: error: call to undeclared function 'MC_PTR_FREE'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
            MC_PTR_FREE (global_speller);
            ^
    spell.c:347:5: error: call to undeclared function 'MC_PTR_FREE'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
        MC_PTR_FREE (global_speller);
        ^
    
    Found by clang 15
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/editor/spell.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/editor/spell.c b/src/editor/spell.c
    index 4b743275f..f7355af79 100644
    a b  
    4343#include "editwidget.h" 
    4444 
    4545#include "spell.h" 
     46#include "lib/util.h"           /* MC_PTR_FREE() */ 
    4647 
    4748/*** global variables ****************************************************************************/ 
    4849