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

Stable branch: fix for clang 19 compiler warnings #2104

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/core/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int nni_aio_expire_q_cnt;

static nni_reap_list aio_reap_list = {
.rl_offset = offsetof(nni_aio, a_reap_node),
.rl_func = (nni_cb) nni_aio_free,
.rl_func = nni_aio_free_cb,
};

static void nni_aio_expire_add(nni_aio *);
Expand Down Expand Up @@ -143,6 +143,12 @@ nni_aio_free(nni_aio *aio)
}
}

void
nni_aio_free_cb(void *aio)
{
nni_aio_free((nni_aio *) aio);
}

void
nni_aio_reap(nni_aio *aio)
{
Expand Down
1 change: 1 addition & 0 deletions src/core/aio.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ extern int nni_aio_alloc(nni_aio **, nni_cb, void *arg);
// This must only be called on an object that was allocated
// with nni_aio_allocate.
extern void nni_aio_free(nni_aio *aio);
extern void nni_aio_free_cb(void *aio);

// nni_aio_stop cancels any unfinished I/O, running completion callbacks,
// but also prevents any new operations from starting (nni_aio_start will
Expand Down
3 changes: 2 additions & 1 deletion src/supplemental/http/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,8 @@ http_handle_dir(nni_aio *aio)

rv = 0;
if (nni_file_is_dir(pn)) {
sprintf(dst, "%s%s", NNG_PLATFORM_DIR_SEP, "index.html");
snprintf(dst, pnsz - strlen(pn), "%s%s", NNG_PLATFORM_DIR_SEP,
"index.html");
if (!nni_file_is_file(pn)) {
pn[strlen(pn) - 1] = '\0'; // index.html -> index.htm
if (!nni_file_is_file(pn)) {
Expand Down