From 1dbb374f1d148f175e3ada50a47152269db32600 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 10 Sep 2014 15:00:29 +0500 Subject: [PATCH] Fix. Warnings on MinGW --- src/lceasy.c | 2 +- src/lcutils.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lceasy.c b/src/lceasy.c index f5cf22b..a9dec1d 100644 --- a/src/lceasy.c +++ b/src/lceasy.c @@ -410,7 +410,7 @@ static int lcurl_easy_unset_HTTPPOST(lua_State *L){ we also unset it to be sure that there no way to call default curl reader with our READDATA */ - curl_easy_setopt(p->curl, CURLOPT_READFUNCTION, 0); + curl_easy_setopt(p->curl, CURLOPT_READFUNCTION, (void*)0); curl_easy_setopt(p->curl, CURLOPT_READDATA, 0); } lcurl_storage_remove_i(L, p->storage, CURLOPT_HTTPPOST); diff --git a/src/lcutils.h b/src/lcutils.h index cfef314..4e0c6f0 100644 --- a/src/lcutils.h +++ b/src/lcutils.h @@ -16,7 +16,8 @@ #define LCURL_MAKE_VERSION(MIN, MAJ, PAT) ((MIN<<16) + (MAJ<<8) + PAT) #define LCURL_CURL_VER_GE(MIN, MAJ, PAT) (LIBCURL_VERSION_NUM >= LCURL_MAKE_VERSION(MIN, MAJ, PAT)) -#define LCURL_STATIC_ASSERT(A) {(int(*)[(A)?1:0])0;} +//! @fixme on mingw32 (gcc 4.8.1) this does not work +#define LCURL_STATIC_ASSERT(A) {(void)(int(*)[(A)?1:0])0;} typedef struct lcurl_const_tag{ const char *name;