apache / couchdb-erlfdb

Erlang API for FoundationDB
https://www.foundationdb.org
Apache License 2.0
28 stars 20 forks source link

Fix C prototype declaration to match implementation #53

Closed JesseStimpson closed 11 months ago

JesseStimpson commented 11 months ago

This PR resolves a compile error on my system when building erlfdb. The error is:

===> In file included from /Users/jstimpson/dev/erlang/JesseStimpson.couchdb-erlfdb/c_src/atoms.c:13:
c_src/atoms.h:25:6: error: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
void erlfdb_init_atoms();
     ^
                       void
/Users/jstimpson/dev/erlang/JesseStimpson.couchdb-erlfdb/c_src/atoms.c:23:1: error: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
erlfdb_init_atoms(ErlNifEnv* env)
^
2 errors generated.

I have the following local version of clang, and haven't specified any env flags.

Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Thanks for taking a look!

JesseStimpson commented 11 months ago

@big-r81 sure thing, since this one got merged already, I went ahead and created #54. Thanks