Ticket #2083: 2083-removing-unused-parm-struct-vfs_class.patch

File 2083-removing-unused-parm-struct-vfs_class.patch, 3.7 KB (added by vit_r, 9 years ago)

removing-unused-parm-struct-vfs_class

  • lib/vfs/mc-vfs/extfs.c

    From 86baadb5e225e1fd930592a0da04ffcea2699656 Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Wed, 3 Mar 2010 16:55:26 +0000
    Subject: [PATCH]  removing unused parm struct vfs_class *
    
    ---
     lib/vfs/mc-vfs/extfs.c    |    8 ++------
     lib/vfs/mc-vfs/ftpfs.c    |    4 +---
     lib/vfs/mc-vfs/sfs.c      |    8 ++------
     lib/vfs/mc-vfs/vfs-impl.h |    4 ++--
     lib/vfs/mc-vfs/vfs.c      |    4 ++--
     5 files changed, 9 insertions(+), 19 deletions(-)
    
    diff --git a/lib/vfs/mc-vfs/extfs.c b/lib/vfs/mc-vfs/extfs.c
    index 752ec99..b16246e 100644
    a b extfs_get_plugins (const char *where, gboolean silent) 
    15161516 
    15171517 
    15181518static int 
    1519 extfs_init (struct vfs_class *me) 
     1519extfs_init (void) 
    15201520{ 
    15211521    gboolean d1, d2; 
    15221522    char *dirname; 
    15231523 
    1524     (void) me; 
    1525  
    15261524    /* 1st: scan user directory */ 
    15271525    dirname = g_build_path (PATH_SEP_STR, home_dir, MC_USERCONF_DIR, (char *) NULL); 
    15281526    d1 = extfs_get_plugins (dirname, TRUE);     /* silent about user dir */ 
    extfs_init (struct vfs_class *me) 
    15341532} 
    15351533 
    15361534static void 
    1537 extfs_done (struct vfs_class *me) 
     1535extfs_done (void) 
    15381536{ 
    15391537    size_t i; 
    15401538    struct archive *ar; 
    15411539 
    1542     (void) me; 
    1543  
    15441540    for (ar = first_archive; ar != NULL;) 
    15451541    { 
    15461542        extfs_free ((vfsid) ar); 
  • lib/vfs/mc-vfs/ftpfs.c

    diff --git a/lib/vfs/mc-vfs/ftpfs.c b/lib/vfs/mc-vfs/ftpfs.c
    index 93bfab6..581ce93 100644
    a b static int ftpfs_fh_close (struct vfs_class *me, struct vfs_s_fh *fh) 
    18351835} 
    18361836 
    18371837static void 
    1838 ftpfs_done (struct vfs_class *me) 
     1838ftpfs_done (void) 
    18391839{ 
    18401840    struct no_proxy_entry *np; 
    18411841 
    1842     (void) me; 
    1843  
    18441842    while (no_proxy) { 
    18451843        np = no_proxy->next; 
    18461844        g_free (no_proxy->domain); 
  • lib/vfs/mc-vfs/sfs.c

    diff --git a/lib/vfs/mc-vfs/sfs.c b/lib/vfs/mc-vfs/sfs.c
    index a5a2423..85fff22 100644
    a b sfs_ungetlocalcopy (struct vfs_class *me, const char *path, 
    336336    return 0; 
    337337} 
    338338 
    339 static int sfs_init (struct vfs_class *me) 
     339static int sfs_init (void) 
    340340{ 
    341341    char *mc_sfsini; 
    342342    FILE *cfg; 
    343343    char key[256]; 
    344344 
    345     (void) me; 
    346  
    347345    mc_sfsini = g_build_filename (mc_home, "sfs.ini", (char *) NULL); 
    348346    cfg = fopen (mc_sfsini, "r"); 
    349347 
    static int sfs_init (struct vfs_class *me) 
    407405} 
    408406 
    409407static void 
    410 sfs_done (struct vfs_class *me) 
     408sfs_done (void) 
    411409{ 
    412410    int i; 
    413411 
    414     (void) me; 
    415  
    416412    for (i = 0; i < sfs_no; i++){ 
    417413        g_free (sfs_prefix [i]); 
    418414        g_free (sfs_command [i]); 
  • lib/vfs/mc-vfs/vfs-impl.h

    diff --git a/lib/vfs/mc-vfs/vfs-impl.h b/lib/vfs/mc-vfs/vfs-impl.h
    index 02e5520..b91e98c 100644
    a b struct vfs_class { 
    3535    void *data;                 /* this is for filesystem's own use */ 
    3636    int verrno;                 /* can't use errno because glibc2 might define errno as function */ 
    3737 
    38     int (*init) (struct vfs_class *me); 
    39     void (*done) (struct vfs_class *me); 
     38    int (*init) (void); 
     39    void (*done) (void); 
    4040     
    4141    /** 
    4242     * The fill_names method shall call the callback function for every 
  • lib/vfs/mc-vfs/vfs.c

    diff --git a/lib/vfs/mc-vfs/vfs.c b/lib/vfs/mc-vfs/vfs.c
    index 14d2c0c..693de04 100644
    a b int 
    193193vfs_register_class (struct vfs_class *vfs) 
    194194{ 
    195195    if (vfs->init)              /* vfs has own initialization function */ 
    196         if (!(*vfs->init)(vfs)) /* but it failed */ 
     196        if (!(*vfs->init)())    /* but it failed */ 
    197197            return 0; 
    198198 
    199199    vfs->next = vfs_list; 
    vfs_shut (void) 
    13131313 
    13141314    for (vfs = vfs_list; vfs; vfs = vfs->next) 
    13151315        if (vfs->done) 
    1316             (*vfs->done) (vfs); 
     1316            (*vfs->done) (); 
    13171317 
    13181318    g_ptr_array_free (vfs_openfiles, TRUE); 
    13191319    g_string_free (vfs_str_buffer, TRUE);