Skip to content

Commit 1dbb374

Browse files
committed
Fix. Warnings on MinGW
1 parent 440de78 commit 1dbb374

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lceasy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ static int lcurl_easy_unset_HTTPPOST(lua_State *L){
410410
we also unset it to be sure that there no way to
411411
call default curl reader with our READDATA
412412
*/
413-
curl_easy_setopt(p->curl, CURLOPT_READFUNCTION, 0);
413+
curl_easy_setopt(p->curl, CURLOPT_READFUNCTION, (void*)0);
414414
curl_easy_setopt(p->curl, CURLOPT_READDATA, 0);
415415
}
416416
lcurl_storage_remove_i(L, p->storage, CURLOPT_HTTPPOST);

src/lcutils.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#define LCURL_MAKE_VERSION(MIN, MAJ, PAT) ((MIN<<16) + (MAJ<<8) + PAT)
1717
#define LCURL_CURL_VER_GE(MIN, MAJ, PAT) (LIBCURL_VERSION_NUM >= LCURL_MAKE_VERSION(MIN, MAJ, PAT))
1818

19-
#define LCURL_STATIC_ASSERT(A) {(int(*)[(A)?1:0])0;}
19+
//! @fixme on mingw32 (gcc 4.8.1) this does not work
20+
#define LCURL_STATIC_ASSERT(A) {(void)(int(*)[(A)?1:0])0;}
2021

2122
typedef struct lcurl_const_tag{
2223
const char *name;

0 commit comments

Comments
 (0)