diff --git a/examples/embedded_c/embedded_c.c b/examples/embedded_c/embedded_c.c index 4ff22433..33511ce8 100644 --- a/examples/embedded_c/embedded_c.c +++ b/examples/embedded_c/embedded_c.c @@ -231,7 +231,7 @@ field_get(const char *key, const char *value, size_t valuelen, void *user_data) int -field_stored(const char *path, size_t file_size, void *user_data) +field_stored(const char *path, long long file_size, void *user_data) { struct mg_connection *conn = (struct mg_connection *)user_data; diff --git a/include/civetweb.h b/include/civetweb.h index f4ad376a..97029856 100644 --- a/include/civetweb.h +++ b/include/civetweb.h @@ -814,7 +814,7 @@ struct mg_form_data_handler { * Return value: * TODO: Needs to be defined. */ - int (*field_store)(const char *path, size_t file_size, void *user_data); + int (*field_store)(const char *path, long long file_size, void *user_data); /* User supplied argument, passed to all callback functions. */ void *user_data; diff --git a/src/civetweb.c b/src/civetweb.c index bb349308..98130f53 100644 --- a/src/civetweb.c +++ b/src/civetweb.c @@ -9319,7 +9319,7 @@ mg_upload_field_get(const char *key, /* Helper function for deprecated mg_upload. */ static int -mg_upload_field_stored(const char *path, size_t file_size, void *user_data) +mg_upload_field_stored(const char *path, long long file_size, void *user_data) { struct mg_upload_user_data *fud = (struct mg_upload_user_data *)user_data; (void)file_size; diff --git a/src/handle_form.inl b/src/handle_form.inl index 82a8ebcd..4e6b28b9 100644 --- a/src/handle_form.inl +++ b/src/handle_form.inl @@ -117,7 +117,7 @@ url_encoded_field_get(const struct mg_connection *conn, static int field_stored(const struct mg_connection *conn, const char *path, - size_t file_size, + long long file_size, struct mg_form_data_handler *fdh) { /* Equivalent to "upload" callback of "mg_upload". */ @@ -162,7 +162,7 @@ mg_handle_form_request(struct mg_connection *conn, int r; int field_count = 0; struct file fstore = STRUCT_FILE_INITIALIZER; - size_t file_size = 0; /* init here, to a avoid a false positive + int64_t file_size = 0; /* init here, to a avoid a false positive "uninitialized variable used" warning */ int has_body_data =