Ticket #3435: mc-cleanup-clang-warnings-02.patch

File mc-cleanup-clang-warnings-02.patch, 2.1 KB (added by and, 10 years ago)

v2

  • lib/strutil/strutil8bit.c

    fix clang 3.6 compiler warnings
    
    patch 01: -Wundef
    patch 02: -Wunused-function
    patch 03: -Wnon-literal-null-conversion
    patch 04: -Wmissing-field-initializers
    patch 05: -Wabsolute-value
    patch 06: -Wtautological-pointer-compare
    patch 07: -Wformat
    
    strutil8bit.c:58:1: error: unused function 'char_isalpha' [-Wunused-function]
    strutil8bit.c:59:1: error: unused function 'char_isascii' [-Wunused-function]
    strutil8bit.c:60:1: error: unused function 'char_isblank' [-Wunused-function]
    strutil8bit.c:61:1: error: unused function 'char_iscntrl' [-Wunused-function]
    strutil8bit.c:63:1: error: unused function 'char_isgraph' [-Wunused-function]
    strutil8bit.c:64:1: error: unused function 'char_islower' [-Wunused-function]
    strutil8bit.c:68:1: error: unused function 'char_isupper' [-Wunused-function]
    strutil8bit.c:69:1: error: unused function 'char_isxdigit' [-Wunused-function]
    util.c:83:1: error: unused function 'is_7bit_printable' [-Wunused-function]
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    a b  
    5555 
    5656/* *INDENT-OFF* */ 
    5757DECLARE_CTYPE_WRAPPER (isalnum) 
    58 DECLARE_CTYPE_WRAPPER (isalpha) 
    59 DECLARE_CTYPE_WRAPPER (isascii) 
    60 DECLARE_CTYPE_WRAPPER (isblank) 
    61 DECLARE_CTYPE_WRAPPER (iscntrl) 
    6258DECLARE_CTYPE_WRAPPER (isdigit) 
    63 DECLARE_CTYPE_WRAPPER (isgraph) 
    64 DECLARE_CTYPE_WRAPPER (islower) 
    6559DECLARE_CTYPE_WRAPPER (isprint) 
    6660DECLARE_CTYPE_WRAPPER (ispunct) 
    6761DECLARE_CTYPE_WRAPPER (isspace) 
    68 DECLARE_CTYPE_WRAPPER (isupper) 
    69 DECLARE_CTYPE_WRAPPER (isxdigit) 
    7062DECLARE_CTYPE_WRAPPER (toupper) 
    7163DECLARE_CTYPE_WRAPPER (tolower) 
    7264/* *INDENT-ON* */ 
  • lib/util.c

    a b  
    7979/*** file scope functions ************************************************************************/ 
    8080/* --------------------------------------------------------------------------------------------- */ 
    8181 
     82#ifndef HAVE_CHARSET 
    8283static inline int 
    8384is_7bit_printable (unsigned char c) 
    8485{ 
    8586    return (c > 31 && c < 127); 
    8687} 
     88#endif 
    8789 
    8890/* --------------------------------------------------------------------------------------------- */ 
    8991