8000 Fix deprecated warning in facil.io by vctrmn · Pull Request #154 · zigzap/zap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix deprecated 8000 warning in facil.io #154

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

Merged
merged 1 commit into from
Mar 29, 2025

Conversation

vctrmn
Copy link
Contributor
@vctrmn vctrmn commented Mar 3, 2025

This PR fixes a compiler warning in the websockets.c file regarding a deprecated non-prototype function declaration. The warning occurs because the new_websocket function is initially declared without a prototype but is later defined with a parameter.

The warning looks like this:

facil.io/lib/facil/http/websockets.c:99:14: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
   99 | static ws_s *new_websocket();
      |              ^
facil.io/lib/facil/http/websockets.c:305:14: note: conflicting prototype is here
  305 | static ws_s *new_websocket(intptr_t uuid) {
      |              ^

I encountered this issue while integrating Zap as a zig library in a zig / bazel project (see : https://github.com/vctrmn/zig-text-embeddings-inference)

If you are interested into this topic, I can also upload the BUILD.bazel to showcase how to integrate it.

@renerocksai
Copy link
Member
renerocksai commented Mar 29, 2025

Hi and thanks for this great catch! I am not super interested in Bazel and most certainly not in supporting it (in terms of fixing it, adapting it if newer Bazel versions require changes, etc). In my early ZML times, I integrated Zap into a prototype via Bazel, and your linked project just reminded me of that. If you think it helps, by all means share your BUILD.bazel.

@renerocksai renerocksai merged commit 827e3a6 into zigzap:master Mar 29, 2025
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.

2 participants
0