Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C prototype declaration to match implementation #53

Merged

Conversation

JesseStimpson
Copy link
Contributor

@JesseStimpson JesseStimpson commented Oct 12, 2023

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!

Copy link
Contributor

@nickva nickva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Good find. Thank you for submitting a PR!

@nickva nickva merged commit 11938e1 into apache:main Oct 12, 2023
1 of 21 checks passed
Copy link

@big-r81 big-r81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit. Add a newline at the end of the file.

@JesseStimpson
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants