libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit 8f392a9e5a1007b3cdffa196e8389dc1a60191d0
parent ee32c4aade3403a60617ee4f2e8d390f44a80737
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sun, 29 Sep 2024 16:20:14 +0200

-fix misc warnings

Diffstat:
Msrc/tests/client_server/libtest.h | 24++++++++++++------------
Msrc/tests/client_server/libtest_convenience.c | 2+-
Msrc/tests/client_server/libtest_convenience_client_request.c | 19++++++++++---------
3 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/src/tests/client_server/libtest.h b/src/tests/client_server/libtest.h @@ -61,7 +61,7 @@ struct MHDT_PhaseContext * @return error message, NULL on success */ typedef const char * -(*MHDT_ClientLogic)(void *cls, +(*MHDT_ClientLogic)(const void *cls, const struct MHDT_PhaseContext *pc); @@ -74,7 +74,7 @@ typedef const char * * @return error message, NULL on success */ const char * -MHDT_client_get_root (void *cls, +MHDT_client_get_root (const void *cls, const struct MHDT_PhaseContext *pc); @@ -89,7 +89,7 @@ MHDT_client_get_root (void *cls, * @return error message, NULL on success */ const char * -MHDT_client_get_with_query (void *cls, +MHDT_client_get_with_query (const void *cls, const struct MHDT_PhaseContext *pc); @@ -103,7 +103,7 @@ MHDT_client_get_with_query (void *cls, * @return error message, NULL on success */ const char * -MHDT_client_set_header (void *cls, +MHDT_client_set_header (const void *cls, const struct MHDT_PhaseContext *pc); @@ -118,7 +118,7 @@ MHDT_client_set_header (void *cls, * @return error message, NULL on success */ const char * -MHDT_client_expect_header (void *cls, +MHDT_client_expect_header (const void *cls, const struct MHDT_PhaseContext *pc); @@ -131,7 +131,7 @@ MHDT_client_expect_header (void *cls, * @return error message, NULL on success */ const char * -MHDT_client_put_data (void *cls, +MHDT_client_put_data (const void *cls, const struct MHDT_PhaseContext *pc); @@ -144,7 +144,7 @@ MHDT_client_put_data (void *cls, * @return error message, NULL on success */ const char * -MHDT_client_chunk_data (void *cls, +MHDT_client_chunk_data (const void *cls, const struct MHDT_PhaseContext *pc); @@ -256,7 +256,7 @@ struct MHDT_PostInstructions */ const char * MHDT_client_do_post ( - void *cls, + const void *cls, const struct MHDT_PhaseContext *pc); @@ -280,7 +280,7 @@ struct MHDT_Phase /** * Closure for @e server_cb. */ - void *server_cb_cls; + const void *server_cb_cls; /** * Logic for the CURL client for this phase. @@ -290,7 +290,7 @@ struct MHDT_Phase /** * Closure for @e client_cb. */ - void *client_cb_cls; + const void *client_cb_cls; /** * How long is the phase allowed to run at most before @@ -541,7 +541,7 @@ MHDT_server_reply_check_post ( * @return error message, NULL on success */ typedef const char * -(*MHDT_ServerSetup)(void *cls, +(*MHDT_ServerSetup)(const void *cls, struct MHD_Daemon *d); @@ -554,7 +554,7 @@ typedef const char * * @return error message, NULL on success */ const char * -MHDT_server_setup_minimal (void *cls, +MHDT_server_setup_minimal (const void *cls, struct MHD_Daemon *d); diff --git a/src/tests/client_server/libtest_convenience.c b/src/tests/client_server/libtest_convenience.c @@ -33,7 +33,7 @@ const char * -MHDT_server_setup_minimal (void *cls, +MHDT_server_setup_minimal (const void *cls, struct MHD_Daemon *d) { const struct MHD_DaemonOptionAndValue *options = cls; diff --git a/src/tests/client_server/libtest_convenience_client_request.c b/src/tests/client_server/libtest_convenience_client_request.c @@ -228,7 +228,7 @@ check_status (CURL *c, const char * MHDT_client_get_root ( - void *cls, + const void *cls, const struct MHDT_PhaseContext *pc) { const char *text = cls; @@ -257,7 +257,7 @@ MHDT_client_get_root ( const char * MHDT_client_get_with_query ( - void *cls, + const void *cls, const struct MHDT_PhaseContext *pc) { const char *args = cls; @@ -294,8 +294,9 @@ MHDT_client_get_with_query ( const char * -MHDT_client_set_header (void *cls, - const struct MHDT_PhaseContext *pc) +MHDT_client_set_header ( + const void *cls, + const struct MHDT_PhaseContext *pc) { const char *hdr = cls; CURL *c; @@ -339,7 +340,7 @@ MHDT_client_set_header (void *cls, const char * -MHDT_client_expect_header (void *cls, +MHDT_client_expect_header (const void *cls, const struct MHDT_PhaseContext *pc) { #ifdef HAVE_LIBCRUL_NEW_HDR_API @@ -469,7 +470,7 @@ read_cb (void *ptr, const char * MHDT_client_put_data ( - void *cls, + const void *cls, const struct MHDT_PhaseContext *pc) { const char *text = cls; @@ -532,7 +533,7 @@ MHDT_client_put_data ( const char * MHDT_client_chunk_data ( - void *cls, + const void *cls, const struct MHDT_PhaseContext *pc) { const char *text = cls; @@ -588,10 +589,10 @@ MHDT_client_chunk_data ( const char * MHDT_client_do_post ( - void *cls, + const void *cls, const struct MHDT_PhaseContext *pc) { - struct MHDT_PostInstructions *pi = cls; + const struct MHDT_PostInstructions *pi = cls; CURL *c; struct curl_slist *request_hdr = NULL;