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

File mc-cleanup-clang-warnings-07.patch, 1.5 KB (added by and, 10 years ago)
  • src/vfs/smbfs/helpers/lib/charset.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
    
    lib/charset.c:269:81: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
    lib/charset.c:277:72: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    a b  
    266266    if (SVAL (buf, CODEPAGE_VERSION_OFFSET) != CODEPAGE_FILE_VERSION_ID) 
    267267    { 
    268268        DEBUG (0, ("load_client_codepage: filename %s has incorrect version id. \ 
    269 Needed %hu, got %hu.\n", codepage_file_name, (uint16) CODEPAGE_FILE_VERSION_ID, SVAL (buf, CODEPAGE_VERSION_OFFSET))); 
     269Needed %hu, got %u.\n", codepage_file_name, (uint16) CODEPAGE_FILE_VERSION_ID, SVAL (buf, CODEPAGE_VERSION_OFFSET))); 
    270270        goto clean_and_exit; 
    271271    } 
    272272 
     
    274274    if (SVAL (buf, CODEPAGE_CLIENT_CODEPAGE_OFFSET) != (uint16) client_codepage) 
    275275    { 
    276276        DEBUG (0, ("load_client_codepage: filename %s has incorrect codepage. \ 
    277 Needed %hu, got %hu.\n", codepage_file_name, (uint16) client_codepage, SVAL (buf, CODEPAGE_CLIENT_CODEPAGE_OFFSET))); 
     277Needed %hu, got %u.\n", codepage_file_name, (uint16) client_codepage, SVAL (buf, CODEPAGE_CLIENT_CODEPAGE_OFFSET))); 
    278278        goto clean_and_exit; 
    279279    } 
    280280