From bea76e6f3700d7d05b57c94ae6bd97dc22eae140 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Fri, 14 Jul 2023 14:51:52 +0200 Subject: [PATCH] MT#57834 Suppress warnings coming from `spandsp_logging` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make silent this: In file included from spandsp_logging-test.c:9: spandsp_logging.h: In function ‘my_span_set_log’: spandsp_logging.h:5:9: error: too few arguments to function ‘span_log_set_message_handler’ 5 | span_log_set_message_handler(ls, h); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from spandsp_logging-test.c:7: /usr/local/include/spandsp/logging.h:125:20: note: declared here 125 | SPAN_DECLARE(void) span_log_set_message_handler(logging_state_t *s, message_handler_func_t func, void *user_data); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from spandsp_logging-test.c:9: spandsp_logging.h: In function ‘my_span_mh’: spandsp_logging.h:8:9: error: too few arguments to function ‘span_set_message_handler’ 8 | span_set_message_handler(h); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from spandsp_logging-test.c:7: /usr/local/include/spandsp/logging.h:127:20: note: declared here 127 | SPAN_DECLARE(void) span_set_message_handler(message_handler_func_t func, void *user_data); | ^~~~~~~~~~~~~~~~~~~~~~~~ spandsp_logging-test.c: In function ‘main’: spandsp_logging-test.c:18:29: warning: passing argument 2 of ‘my_span_set_log’ from incompatible pointer type [-Wincompatible-pointer-types] 18 | my_span_set_log(ls, logfunc); | ^~~~~~~ | | | void (*)(int, const char *) In file included from spandsp_logging-test.c:9: spandsp_logging.h:4:73: note: expected ‘message_handler_func_t’ {aka ‘void (*)(void *, int, const char *)’} but argument is of type ‘void (*)(int, const char *)’ 4 | INLINE void my_span_set_log(logging_state_t *ls, message_handler_func_t h) { | ~~~~~~~~~~~~~~~~~~~~~~~^ t38.c: In function ‘t38_gateway_pair’: t38.c:419:29: warning: passing argument 2 of ‘my_span_set_log’ from incompatible pointer type [-Wincompatible-pointer-types] 419 | my_span_set_log(ls, spandsp_logging_func); | ^~~~~~~~~~~~~~~~~~~~ | | | void (*)(int, const char *) In file included from t38.c:11: spandsp_logging.h:4:73: note: expected ‘message_handler_func_t’ {aka ‘void (*)(void *, int, const char *)’} but argument is of type ‘void (*)(int, const char *)’ 4 | INLINE void my_span_set_log(logging_state_t *ls, message_handler_func_t h) { | ~~~~~~~~~~~~~~~~~~~~~~~^ Change-Id: Ib67db21e1d1ea684fd312bbaf9a8ec7a7542e3cb --- lib/common.Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.Makefile b/lib/common.Makefile index 30bf4c217..c6f7b427e 100644 --- a/lib/common.Makefile +++ b/lib/common.Makefile @@ -54,6 +54,6 @@ t38.c: spandsp_logging.h ../utils/const_str_hash "$<" < "$<" > "$@" $(BUILD_TEST_ALTS): ../lib/$(@:.h=-*) - ../utils/build_test_wrapper "$@" + ../utils/build_test_wrapper "$@" 2> /dev/null .PHONY: all debug clean install