mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
fix clang warnings
This commit is contained in:
@@ -44,7 +44,7 @@ mfshell_cmd_help(mfshell_t *mfshell, int argc, char **argv)
|
||||
unsigned int column1_width = 0;
|
||||
unsigned int column2_width = 0;
|
||||
|
||||
_cmd_t* curr_cmd;
|
||||
cmd_t* curr_cmd;
|
||||
for (curr_cmd = mfshell->commands; curr_cmd->name != NULL; curr_cmd++) {
|
||||
if (strlen(curr_cmd->name) > column1_width)
|
||||
column1_width = strlen(curr_cmd->name);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "mfshell.h"
|
||||
#include "commands.h"
|
||||
|
||||
struct _cmd_s commands[] = {
|
||||
struct cmd_t commands[] = {
|
||||
{"help", "", "show this help", mfshell_cmd_help},
|
||||
{"debug", "", "show debug information", mfshell_cmd_debug},
|
||||
{"host", "<server>", "change target server", mfshell_cmd_host},
|
||||
@@ -95,7 +95,7 @@ mfshell_create(int app_id,char *app_key,char *server)
|
||||
int
|
||||
mfshell_exec(mfshell_t *mfshell, int argc, char **argv)
|
||||
{
|
||||
_cmd_t* curr_cmd;
|
||||
cmd_t* curr_cmd;
|
||||
for (curr_cmd = mfshell->commands; curr_cmd->name != NULL; curr_cmd++) {
|
||||
if (strcmp(argv[0], curr_cmd->name) == 0) {
|
||||
return curr_cmd->handler(mfshell, argc, argv);
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
#include "../mfapi/folder.h"
|
||||
#include "../mfapi/mfconn.h"
|
||||
|
||||
typedef struct _cmd_s _cmd_t;
|
||||
typedef struct _mfshell_s mfshell_t;
|
||||
typedef struct cmd_t cmd_t;
|
||||
typedef struct mfshell_t mfshell_t;
|
||||
|
||||
struct _cmd_s
|
||||
struct cmd_t
|
||||
{
|
||||
char *name;
|
||||
char *argstring;
|
||||
@@ -35,7 +35,7 @@ struct _cmd_s
|
||||
int (*handler) (mfshell_t *mfshell, int argc, char **argv);
|
||||
};
|
||||
|
||||
struct _mfshell_s
|
||||
struct mfshell_t
|
||||
{
|
||||
int app_id;
|
||||
char *app_key;
|
||||
@@ -48,15 +48,11 @@ struct _mfshell_s
|
||||
char *local_working_dir;
|
||||
|
||||
/* shell commands */
|
||||
_cmd_t *commands;
|
||||
cmd_t *commands;
|
||||
|
||||
mfconn_t *mfconn;
|
||||
};
|
||||
|
||||
typedef struct _mfshell_s mfshell_t;
|
||||
typedef struct _folder_s folder_t;
|
||||
typedef struct _cmd_s cmd_t;
|
||||
|
||||
mfshell_t* mfshell_create(int app_id,char *app_key,char *server);
|
||||
|
||||
int mfshell_authenticate_user(mfshell_t *mfshell);
|
||||
|
||||
Reference in New Issue
Block a user