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:
@@ -28,9 +28,7 @@
|
||||
#include "mfconn.h"
|
||||
#include "apicalls.h"
|
||||
|
||||
typedef struct _mfconn_s mfconn_t;
|
||||
|
||||
struct _mfconn_s
|
||||
struct mfconn_t
|
||||
{
|
||||
char *server;
|
||||
uint32_t secret_key;
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
|
||||
#include "file.h"
|
||||
|
||||
typedef struct _mfconn_s mfconn_t;
|
||||
|
||||
struct _mfconn_s;
|
||||
typedef struct mfconn_t mfconn_t;
|
||||
|
||||
mfconn_t* mfconn_create(char *server, char *username, char *password, int app_id, char *app_key);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <curl/curl.h>
|
||||
#include <curl/easy.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "http.h"
|
||||
@@ -28,7 +29,7 @@ static size_t http_read_buf_cb(char *data, size_t size, size_t nmemb, void *user
|
||||
static size_t http_write_buf_cb(char *data, size_t size, size_t nmemb, void *user_ptr);
|
||||
static size_t http_write_file_cb(char *data, size_t size, size_t nmemb, void *user_ptr);
|
||||
|
||||
struct _http_s
|
||||
struct http_t
|
||||
{
|
||||
CURL *curl_handle;
|
||||
char *write_buf;
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
|
||||
#include <jansson.h>
|
||||
|
||||
typedef struct _http_s http_t;
|
||||
|
||||
struct _http_s;
|
||||
typedef struct http_t http_t;
|
||||
|
||||
http_t* http_create(void);
|
||||
void http_destroy(http_t* conn);
|
||||
|
||||
Reference in New Issue
Block a user