You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc -c -O3 -Wall -pedantic -DNDEBUG -I/usr/local/include -fpic -o lua_cjson.o lua_cjson.c
In file included from lua_cjson.c:48:
fpconv.h:15:20: warning: inline function ‘fpconv_init’ declared but never defined
15 | extern inline void fpconv_init();
| ^~~~~~~~~~~
cc -c -O3 -Wall -pedantic -DNDEBUG -I/usr/local/include -fpic -o strbuf.o strbuf.c
cc -c -O3 -Wall -pedantic -DNDEBUG -I/usr/local/include -fpic -o fpconv.o fpconv.c
cc -shared -o cjson.so lua_cjson.o strbuf.o fpconv.o
I cannot imagine what good the inline without body is. I've compiled with the following patch and everything seems to work fine.
From c9551b68ec78ecea8d31af41bbffc2f4a39d1965 Mon Sep 17 00:00:00 2001
From: Tomas Volf <[email protected]>
Date: Tue, 15 Mar 2022 18:30:24 +0100
Subject: [PATCH] Fix compilation warning about fpconv_init
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In file included from lua_cjson.c:48:
fpconv.h:15:20: warning: inline function ‘fpconv_init’ declared but never defined
15 | extern inline void fpconv_init();
| ^~~~~~~~~~~
inline does not seem to do anything useful here, since there is no body
to inline. And extern is default. So let's just drop both, we get no
warning and everything still works.
---
fpconv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fpconv.h b/fpconv.h
index 0124908..22cab98 100644
--- a/fpconv.h
+++ b/fpconv.h
@@ -12,7 +12,7 @@ static inline void fpconv_init()
/* Do nothing - not required */
}
#else
-extern inline void fpconv_init();
+void fpconv_init();
#endif
extern int fpconv_g_fmt(char*, double, int);
--
2.35.1
The text was updated successfully, but these errors were encountered:
rzanol
pushed a commit
to rzanol/lua-cjson
that referenced
this issue
Sep 21, 2023
…re light userdata address with masked address (mpx#82)
Since we used `json_lightudata_mask` when creating lightuserdata, same
mask should be applied when comparing the return of `touserdata`
Fixesmpx#81.
I cannot imagine what good the inline without body is. I've compiled with the following patch and everything seems to work fine.
The text was updated successfully, but these errors were encountered: