Squashed warning under linux

This commit is contained in:
Sergey Lyubka 2012-09-30 16:35:09 +01:00
parent 043ea54a2a
commit 47651766fb
2 changed files with 3 additions and 3 deletions

View File

@ -526,7 +526,7 @@ static int is_file_in_memory(struct mg_connection *conn, const char *path,
struct file *filep) {
conn->request_info.ev_data = (void *) path;
if ((filep->membuf = call_user(conn, MG_OPEN_FILE)) != NULL) {
filep->size = (int) conn->request_info.ev_data;
filep->size = (int) (long) conn->request_info.ev_data;
}
return filep->membuf != NULL;
}
@ -922,7 +922,7 @@ static void send_http_error(struct mg_connection *conn, int status,
int len;
conn->status_code = status;
conn->request_info.ev_data = (void *) status;
conn->request_info.ev_data = (void *) (long) status;
if (call_user(conn, MG_HTTP_ERROR) == NULL) {
buf[0] = '\0';
len = 0;

View File

@ -67,7 +67,7 @@ enum mg_event {
// HTTP error must be returned to the client.
// If callback returns non-NULL, Mongoose stops handling error.
// ev_data contains HTTP error code:
// int http_reply_status_code = (int) request_info->ev_data;
// int http_reply_status_code = (long) request_info->ev_data;
MG_HTTP_ERROR,
// Mongoose logs a message.