Cleaned up some warnings.
Этот коммит содержится в:
родитель
1a9db64987
Коммит
7d12623b27
@ -259,7 +259,6 @@ int my_system (int flags, const char *shell, const char *command)
|
|||||||
struct sigaction ignore, save_intr, save_quit, save_stop;
|
struct sigaction ignore, save_intr, save_quit, save_stop;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
int as_shell_command = flags & EXECUTE_AS_SHELL;
|
|
||||||
|
|
||||||
ignore.sa_handler = SIG_IGN;
|
ignore.sa_handler = SIG_IGN;
|
||||||
sigemptyset (&ignore.sa_mask);
|
sigemptyset (&ignore.sa_mask);
|
||||||
|
14
vfs/fish.c
14
vfs/fish.c
@ -128,7 +128,6 @@ static int decode_reply (char *s, int was_garbage)
|
|||||||
static int get_reply (int sock, char *string_buf, int string_len)
|
static int get_reply (int sock, char *string_buf, int string_len)
|
||||||
{
|
{
|
||||||
char answer[1024];
|
char answer[1024];
|
||||||
int i;
|
|
||||||
int was_garbage = 0;
|
int was_garbage = 0;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -335,7 +334,6 @@ error:
|
|||||||
static struct connection *
|
static struct connection *
|
||||||
open_link (char *host, char *user, int flags, char *netrcpass)
|
open_link (char *host, char *user, int flags, char *netrcpass)
|
||||||
{
|
{
|
||||||
int sock;
|
|
||||||
struct connection *bucket;
|
struct connection *bucket;
|
||||||
struct linklist *lptr;
|
struct linklist *lptr;
|
||||||
|
|
||||||
@ -386,6 +384,7 @@ get_path (struct connection **bucket, char *path)
|
|||||||
qflags((*bucket)) |= FISH_FLAG_RSH;
|
qflags((*bucket)) |= FISH_FLAG_RSH;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -400,7 +399,7 @@ get_path (struct connection **bucket, char *path)
|
|||||||
static struct dir *
|
static struct dir *
|
||||||
retrieve_dir(struct connection *bucket, char *remote_path, int resolve_symlinks)
|
retrieve_dir(struct connection *bucket, char *remote_path, int resolve_symlinks)
|
||||||
{
|
{
|
||||||
int sock, has_symlinks;
|
int has_symlinks;
|
||||||
struct linklist *file_list, *p;
|
struct linklist *file_list, *p;
|
||||||
struct direntry *fe;
|
struct direntry *fe;
|
||||||
char buffer[8192];
|
char buffer[8192];
|
||||||
@ -505,9 +504,6 @@ retrieve_dir(struct connection *bucket, char *remote_path, int resolve_symlinks)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'd': {
|
case 'd': {
|
||||||
time_t t;
|
|
||||||
int idx;
|
|
||||||
|
|
||||||
split_text(buffer+1);
|
split_text(buffer+1);
|
||||||
if (!parse_filedate(0, &fe->s.st_ctime))
|
if (!parse_filedate(0, &fe->s.st_ctime))
|
||||||
break;
|
break;
|
||||||
@ -567,7 +563,7 @@ error_3:
|
|||||||
static int
|
static int
|
||||||
store_file(struct direntry *fe)
|
store_file(struct direntry *fe)
|
||||||
{
|
{
|
||||||
int local_handle, sock, n, total;
|
int local_handle, n, total;
|
||||||
char buffer[8192];
|
char buffer[8192];
|
||||||
struct stat s;
|
struct stat s;
|
||||||
int was_error = 0;
|
int was_error = 0;
|
||||||
@ -638,7 +634,6 @@ static int remotelocal_handle, remoten = 0, remotestat_size;
|
|||||||
static void
|
static void
|
||||||
fish_abort (struct connection *bucket)
|
fish_abort (struct connection *bucket)
|
||||||
{
|
{
|
||||||
char buffer[8192];
|
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
print_vfs_message( "Aborting transfer..." );
|
print_vfs_message( "Aborting transfer..." );
|
||||||
@ -764,8 +759,6 @@ int fish_ctl (void *data, int ctlop, int arg)
|
|||||||
|
|
||||||
static int retrieve_file(struct direntry *fe)
|
static int retrieve_file(struct direntry *fe)
|
||||||
{
|
{
|
||||||
int total;
|
|
||||||
|
|
||||||
if (fe->local_filename)
|
if (fe->local_filename)
|
||||||
return 1;
|
return 1;
|
||||||
fe->local_stat.st_mtime = 0;
|
fe->local_stat.st_mtime = 0;
|
||||||
@ -885,7 +878,6 @@ FISH_OP(symlink, , "#SYMLINK %s %s\nln -s %s %s; echo '*** 000'" );
|
|||||||
int fish_chown (char *path, int owner, int group)
|
int fish_chown (char *path, int owner, int group)
|
||||||
{
|
{
|
||||||
char *sowner, *sgroup;
|
char *sowner, *sgroup;
|
||||||
int res;
|
|
||||||
PREFIX
|
PREFIX
|
||||||
sowner = getpwuid( owner )->pw_name;
|
sowner = getpwuid( owner )->pw_name;
|
||||||
sgroup = getgrgid( group )->gr_name;
|
sgroup = getgrgid( group )->gr_name;
|
||||||
|
@ -246,7 +246,6 @@ static void sfs_free (vfsid id)
|
|||||||
void sfs_fill_names (void (*func)(char *))
|
void sfs_fill_names (void (*func)(char *))
|
||||||
{
|
{
|
||||||
struct cachedfile *cur = head;
|
struct cachedfile *cur = head;
|
||||||
char *name;
|
|
||||||
|
|
||||||
while (cur){
|
while (cur){
|
||||||
(*func)(cur->name);
|
(*func)(cur->name);
|
||||||
@ -375,7 +374,7 @@ void sfs_init (void)
|
|||||||
case '2': flags |= F_2; break;
|
case '2': flags |= F_2; break;
|
||||||
case 'R': flags |= F_NOLOCALCOPY; break;
|
case 'R': flags |= F_NOLOCALCOPY; break;
|
||||||
default:
|
default:
|
||||||
fprintf( stderr, "Warning: Invalid flag %c in sfs.ini line %s.\n", c, key );
|
fprintf( stderr, "Warning: Invalid flag %c in sfs.ini line %s.\n", *c, key );
|
||||||
}
|
}
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include "../src/panel.h"
|
#include "../src/panel.h"
|
||||||
#include "../src/key.h" /* Required for the async alarm handler */
|
#include "../src/key.h" /* Required for the async alarm handler */
|
||||||
#include "../src/layout.h" /* For get_panel_widget and get_other_index */
|
#include "../src/layout.h" /* For get_panel_widget and get_other_index */
|
||||||
|
#include "../src/dialog.h"
|
||||||
#endif
|
#endif
|
||||||
#include "vfs.h"
|
#include "vfs.h"
|
||||||
#include "mcfs.h"
|
#include "mcfs.h"
|
||||||
@ -57,7 +58,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int get_other_type (void);
|
extern int get_other_type (void);
|
||||||
extern int extfs_which (char *path);
|
|
||||||
|
|
||||||
int vfs_timeout = 60; /* VFS timeout in seconds */
|
int vfs_timeout = 60; /* VFS timeout in seconds */
|
||||||
int vfs_flags = /* Flags */
|
int vfs_flags = /* Flags */
|
||||||
@ -100,6 +100,7 @@ static int get_bucket (void)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
vfs_die ("No more virtual file handles");
|
vfs_die ("No more virtual file handles");
|
||||||
|
return 0; /* Shut up, stupid gcc */
|
||||||
}
|
}
|
||||||
|
|
||||||
vfs *vfs_type_from_op (char *path)
|
vfs *vfs_type_from_op (char *path)
|
||||||
@ -1228,7 +1229,7 @@ static int is_year(char *str, struct tm *tim)
|
|||||||
return 0;
|
return 0;
|
||||||
if (strlen(str)!=4)
|
if (strlen(str)!=4)
|
||||||
return 0;
|
return 0;
|
||||||
if (sscanf(str, "%d", &year) != 1)
|
if (sscanf(str, "%ld", &year) != 1)
|
||||||
return 0;
|
return 0;
|
||||||
if (year < 1900 || year > 3000)
|
if (year < 1900 || year > 3000)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1317,7 +1318,6 @@ int parse_filemode (char *p)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int parse_filedate(int idx, time_t *t)
|
int parse_filedate(int idx, time_t *t)
|
||||||
{ /* This thing parses from idx in columns[] array */
|
{ /* This thing parses from idx in columns[] array */
|
||||||
static char *month = "JanFebMarAprMayJunJulAugSepOctNovDec";
|
static char *month = "JanFebMarAprMayJunJulAugSepOctNovDec";
|
||||||
|
13
vfs/vfs.h
13
vfs/vfs.h
@ -140,7 +140,14 @@ struct utimbuf {
|
|||||||
char *tarfs_analysis (char *inname, char **archive, int is_dir);
|
char *tarfs_analysis (char *inname, char **archive, int is_dir);
|
||||||
|
|
||||||
void ftpfs_init(void);
|
void ftpfs_init(void);
|
||||||
|
void fish_init(void);
|
||||||
|
void sfs_init(void);
|
||||||
void ftpfs_done(void);
|
void ftpfs_done(void);
|
||||||
|
void sfs_done(void);
|
||||||
|
void fish_done(void);
|
||||||
|
int extfs_which (char *path);
|
||||||
|
int sfs_which (char *path);
|
||||||
|
|
||||||
void ftpfs_set_debug (char *file);
|
void ftpfs_set_debug (char *file);
|
||||||
#ifdef USE_NETCODE
|
#ifdef USE_NETCODE
|
||||||
void ftpfs_hint_reread(int reread);
|
void ftpfs_hint_reread(int reread);
|
||||||
@ -153,6 +160,8 @@ struct utimbuf {
|
|||||||
void mcfs_fill_names (void (*)(char *));
|
void mcfs_fill_names (void (*)(char *));
|
||||||
void ftpfs_fill_names (void (*)(char *));
|
void ftpfs_fill_names (void (*)(char *));
|
||||||
void tarfs_fill_names (void (*)(char *));
|
void tarfs_fill_names (void (*)(char *));
|
||||||
|
void fish_fill_names (void (*)(char *));
|
||||||
|
void sfs_fill_names (void (*)(char *));
|
||||||
|
|
||||||
/* Only the routines outside of the VFS module need the emulation macros */
|
/* Only the routines outside of the VFS module need the emulation macros */
|
||||||
|
|
||||||
@ -290,6 +299,10 @@ struct utimbuf {
|
|||||||
|
|
||||||
#ifdef WANT_PARSE_LS_LGA
|
#ifdef WANT_PARSE_LS_LGA
|
||||||
int parse_ls_lga (char *p, struct stat *s, char **filename, char **linkname);
|
int parse_ls_lga (char *p, struct stat *s, char **filename, char **linkname);
|
||||||
|
int split_text (char *p);
|
||||||
|
int parse_filetype (char c);
|
||||||
|
int parse_filemode (char *p);
|
||||||
|
int parse_filedate(int idx, time_t *t);
|
||||||
#endif
|
#endif
|
||||||
extern void vfs_die (char *msg);
|
extern void vfs_die (char *msg);
|
||||||
extern char *vfs_get_password (char *msg);
|
extern char *vfs_get_password (char *msg);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user