Skip to content

Commit caa1b28

Browse files
committed
Merge pull request #16 from moteus/master
Fix. Warnings on MinGW
2 parents a6b5498 + 1dbb374 commit caa1b28

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

lakefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
PROJECT = 'lcurl'
1+
PROJECT = 'cURL'
22

33
INITLAKEFILE()
44

55
DEFINES = L{DEFINES,
66
IF(WINDOWS, 'DLL_EXPORT', '');
77
}
88

9-
cURL = c.shared{PROJECT,
9+
cURL = c.shared{'lcurl',
1010
base = 'src',
1111
src = '*.c',
1212
needs = {LUA_NEED, 'libcurl', IF(WINDOWS, 'winsock2', 'sockets')},
@@ -19,9 +19,9 @@ target('build', cURL)
1919

2020
install = target('install', {
2121
file.group{odir=LIBDIR; src = cURL };
22-
file.group{odir=J(LIBDIR, PROJECT); src = J("src", "lua") };
23-
file.group{odir=J(ROOT, 'examples'); src = 'examples'; recurse = true };
24-
file.group{odir=TESTDIR; src = 'test'; recurse = true };
22+
file.group{odir=J(LIBDIR, PROJECT); src = J("src", "lua") ; recurse = true };
23+
file.group{odir=J(ROOT, 'examples'); src = 'examples'; recurse = true };
24+
file.group{odir=TESTDIR; src = 'test'; recurse = true };
2525
})
2626

2727
target('test', install, function()

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)