Browse Source

MT#57834 Suppress warnings coming from `spandsp_logging`

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
pull/1694/head
Donat Zenichev 2 years ago
parent
commit
bea76e6f37
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/common.Makefile

+ 1
- 1
lib/common.Makefile View File

@ -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

Loading…
Cancel
Save