openresty / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua
http://www.kyne.com.au/~mark/software/lua-cjson.php
MIT License
436 stars 119 forks source link

Add void to functions with no arguments to prevent compiler warning #85

Closed dundargoc closed 1 year ago

dundargoc commented 2 years ago

Clang 15.0.0 will give the following warning if (void) isn't provided:

warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]

xiaocang commented 1 year ago

already merged here: https://github.com/openresty/lua-cjson/commit/1dff61d9bf390372124c13443e0131a96383f5bc