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;
|
||||
pid_t pid;
|
||||
int status = 0;
|
||||
int as_shell_command = flags & EXECUTE_AS_SHELL;
|
||||
|
||||
ignore.sa_handler = SIG_IGN;
|
||||
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)
|
||||
{
|
||||
char answer[1024];
|
||||
int i;
|
||||
int was_garbage = 0;
|
||||
|
||||
for (;;) {
|
||||
@ -335,7 +334,6 @@ error:
|
||||
static struct connection *
|
||||
open_link (char *host, char *user, int flags, char *netrcpass)
|
||||
{
|
||||
int sock;
|
||||
struct connection *bucket;
|
||||
struct linklist *lptr;
|
||||
|
||||
@ -386,6 +384,7 @@ get_path (struct connection **bucket, char *path)
|
||||
qflags((*bucket)) |= FISH_FLAG_RSH;
|
||||
return res;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -400,7 +399,7 @@ get_path (struct connection **bucket, char *path)
|
||||
static struct dir *
|
||||
retrieve_dir(struct connection *bucket, char *remote_path, int resolve_symlinks)
|
||||
{
|
||||
int sock, has_symlinks;
|
||||
int has_symlinks;
|
||||
struct linklist *file_list, *p;
|
||||
struct direntry *fe;
|
||||
char buffer[8192];
|
||||
@ -505,9 +504,6 @@ retrieve_dir(struct connection *bucket, char *remote_path, int resolve_symlinks)
|
||||
}
|
||||
break;
|
||||
case 'd': {
|
||||
time_t t;
|
||||
int idx;
|
||||
|
||||
split_text(buffer+1);
|
||||
if (!parse_filedate(0, &fe->s.st_ctime))
|
||||
break;
|
||||
@ -567,7 +563,7 @@ error_3:
|
||||
static int
|
||||
store_file(struct direntry *fe)
|
||||
{
|
||||
int local_handle, sock, n, total;
|
||||
int local_handle, n, total;
|
||||
char buffer[8192];
|
||||
struct stat s;
|
||||
int was_error = 0;
|
||||
@ -638,7 +634,6 @@ static int remotelocal_handle, remoten = 0, remotestat_size;
|
||||
static void
|
||||
fish_abort (struct connection *bucket)
|
||||
{
|
||||
char buffer[8192];
|
||||
int n;
|
||||
|
||||
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)
|
||||
{
|
||||
int total;
|
||||
|
||||
if (fe->local_filename)
|
||||
return 1;
|
||||
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)
|
||||
{
|
||||
char *sowner, *sgroup;
|
||||
int res;
|
||||
PREFIX
|
||||
sowner = getpwuid( owner )->pw_name;
|
||||
sgroup = getgrgid( group )->gr_name;
|
||||
|
@ -246,7 +246,6 @@ static void sfs_free (vfsid id)
|
||||
void sfs_fill_names (void (*func)(char *))
|
||||
{
|
||||
struct cachedfile *cur = head;
|
||||
char *name;
|
||||
|
||||
while (cur){
|
||||
(*func)(cur->name);
|
||||
@ -375,7 +374,7 @@ void sfs_init (void)
|
||||
case '2': flags |= F_2; break;
|
||||
case 'R': flags |= F_NOLOCALCOPY; break;
|
||||
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++;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "../src/panel.h"
|
||||
#include "../src/key.h" /* Required for the async alarm handler */
|
||||
#include "../src/layout.h" /* For get_panel_widget and get_other_index */
|
||||
#include "../src/dialog.h"
|
||||
#endif
|
||||
#include "vfs.h"
|
||||
#include "mcfs.h"
|
||||
@ -57,7 +58,6 @@
|
||||
#endif
|
||||
|
||||
extern int get_other_type (void);
|
||||
extern int extfs_which (char *path);
|
||||
|
||||
int vfs_timeout = 60; /* VFS timeout in seconds */
|
||||
int vfs_flags = /* Flags */
|
||||
@ -100,6 +100,7 @@ static int get_bucket (void)
|
||||
return i;
|
||||
}
|
||||
vfs_die ("No more virtual file handles");
|
||||
return 0; /* Shut up, stupid gcc */
|
||||
}
|
||||
|
||||
vfs *vfs_type_from_op (char *path)
|
||||
@ -1228,7 +1229,7 @@ static int is_year(char *str, struct tm *tim)
|
||||
return 0;
|
||||
if (strlen(str)!=4)
|
||||
return 0;
|
||||
if (sscanf(str, "%d", &year) != 1)
|
||||
if (sscanf(str, "%ld", &year) != 1)
|
||||
return 0;
|
||||
if (year < 1900 || year > 3000)
|
||||
return 0;
|
||||
@ -1317,7 +1318,6 @@ int parse_filemode (char *p)
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
int parse_filedate(int idx, time_t *t)
|
||||
{ /* This thing parses from idx in columns[] array */
|
||||
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);
|
||||
|
||||
void ftpfs_init(void);
|
||||
void fish_init(void);
|
||||
void sfs_init(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);
|
||||
#ifdef USE_NETCODE
|
||||
void ftpfs_hint_reread(int reread);
|
||||
@ -153,6 +160,8 @@ struct utimbuf {
|
||||
void mcfs_fill_names (void (*)(char *));
|
||||
void ftpfs_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 */
|
||||
|
||||
@ -290,6 +299,10 @@ struct utimbuf {
|
||||
|
||||
#ifdef WANT_PARSE_LS_LGA
|
||||
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
|
||||
extern void vfs_die (char *msg);
|
||||
extern char *vfs_get_password (char *msg);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user