Ticket #4490: mc-4490-tar.c-remove-unused-function.patch

File mc-4490-tar.c-remove-unused-function.patch, 1.7 KB (added by and, 14 months ago)
  • src/vfs/tar/tar.c

    From abe34f7a0a0e3f696e8de6191e53f4d0707e223b Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Thu, 28 Sep 2023 22:11:54 +0000
    Subject: [PATCH] (tar.c) remove unused macro and function
    
    tar.c:128:9: warning: macro is not used [-Wunused-macros]
    #define UINTMAX_FROM_HEADER(where) uintmax_from_header (where, sizeof (where))
            ^
    tar.c:253:1: warning: unused function 'uintmax_from_header' [-Wunused-function]
    uintmax_from_header (const char *p, size_t s)
    
    Found by clang-16
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/vfs/tar/tar.c | 9 ---------
     1 file changed, 9 deletions(-)
    
    diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c
    index f718dc0e7..3554b7322 100644
    a b struct tar_stat_info current_stat_info; 
    125125#define MODE_FROM_HEADER(where,hbits) mode_from_header (where, sizeof (where), hbits) 
    126126#define TIME_FROM_HEADER(where) time_from_header (where, sizeof (where)) 
    127127#define UID_FROM_HEADER(where) uid_from_header (where, sizeof (where)) 
    128 #define UINTMAX_FROM_HEADER(where) uintmax_from_header (where, sizeof (where)) 
    129128 
    130129/*** file scope type declarations ****************************************************************/ 
    131130 
    uid_from_header (const char *p, size_t s) 
    249248 
    250249/* --------------------------------------------------------------------------------------------- */ 
    251250 
    252 static inline uintmax_t 
    253 uintmax_from_header (const char *p, size_t s) 
    254 { 
    255     return tar_from_header (p, s, "uintmax_t", 0, UINTMAX_MAX, FALSE); 
    256 } 
    257  
    258 /* --------------------------------------------------------------------------------------------- */ 
    259  
    260251static void 
    261252tar_calc_sparse_offsets (struct vfs_s_inode *inode) 
    262253{