Fix a compiler warning emitted by clang 15.0.7
authorFabian Keil <fk@fabiankeil.de>
Tue, 11 Jul 2023 04:05:40 +0000 (06:05 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 24 Jul 2023 12:20:19 +0000 (14:20 +0200)
Silences:

    filters.c:2561:58: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
       content = (content_filter != NULL) ? (*content_filter)(csp) : NULL;
                                                             ^
    1 warning generated.

filters.c

index 21ee44d..35c8476 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -74,7 +74,7 @@
 #include "win32.h"
 #endif
 
-typedef char *(*filter_function_ptr)();
+typedef char *(*filter_function_ptr)(struct client_state *csp);
 static filter_function_ptr get_filter_function(const struct client_state *csp);
 static jb_err prepare_for_filtering(struct client_state *csp);
 static void apply_url_actions(struct current_action_spec *action,