[sr-dev] [kamailio/kamailio] some build warnings (#2543)

sergey-safarov notifications at github.com
Sun Nov 8 22:10:19 CET 2020


**1**
```
CC (gcc) [kamailio]		core/dst_blocklist.o
CC (gcc) [kamailio]		core/endianness.o
CC (gcc) [kamailio]		core/error.o
core/dns_cache.c: In function 'dns_sip_resolve':
core/dns_cache.c:3303:19: warning: 'origproto' may be used uninitialized in this function [-Wmaybe-uninitialized]
 3303 |   if(proto) *proto=origproto;
      |             ~~~~~~^~~~~~~~~~
core/dns_cache.c:3257:16: note: 'origproto' was declared here
 3257 |  char n_proto, origproto;
      |                ^~~~~~~~~
CC (gcc) [kamailio]		core/events.o
CC (gcc) [kamailio]		core/flags.o
CC (gcc) [kamailio]		core/fmsg.o
CC (gcc) [kamailio]		core/forward.o
CC (gcc) [kamailio]		core/hash_func.o
```

**2**
```
CC (gcc) [M crypto.so]		api.o
CC (gcc) [M crypto.so]		crypto_aes.o
CC (gcc) [M crypto.so]		crypto_evcb.o
CC (gcc) [M crypto.so]		crypto_mod.o
crypto_mod.c: In function 'ki_crypto_hmac_sha256_helper':
crypto_mod.c:316:29: warning: pointer targets in passing argument 1 of 'base64url_enc' differ in signedness [-Wpointer-sign]
  316 |  val.rs.len = base64url_enc((unsigned char *)digest, digest_len, (unsigned char *)val.rs.s, pv_get_buffer_size()-1);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~
      |                             |
      |                             unsigned char *
In file included from crypto_mod.c:33:
../../core/basex.h:867:25: note: expected 'char *' but argument is of type 'unsigned char *'
  867 | int base64url_enc(char *in, int ilen, char *out, int osize);
      |                   ~~~~~~^~
crypto_mod.c:316:66: warning: pointer targets in passing argument 3 of 'base64url_enc' differ in signedness [-Wpointer-sign]
  316 |  val.rs.len = base64url_enc((unsigned char *)digest, digest_len, (unsigned char *)val.rs.s, pv_get_buffer_size()-1);
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                  |
      |                                                                  unsigned char *
In file included from crypto_mod.c:33:
../../core/basex.h:867:45: note: expected 'char *' but argument is of type 'unsigned char *'
  867 | int base64url_enc(char *in, int ilen, char *out, int osize);
      |                                       ~~~~~~^~~
At top level:
crypto_mod.c:343:12: warning: 'ki_crypto_hmac_sha256' defined but not used [-Wunused-function]
  343 | static int ki_crypto_hmac_sha256(sip_msg_t* msg, str *ins, str *keys, str *dpv)
      |            ^~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M crypto.so]		crypto_uuid.o
LD (gcc) [M crypto.so]		crypto.so
```

**3**
```
LD (gcc) [M janssonrpcc.so]		janssonrpcc.so
CC (gcc) [M http_async_client.so]		async_http.o
CC (gcc) [M http_async_client.so]		hm_hash.o
In file included from http_multi.h:40,
                 from async_http.h:48,
                 from async_http.c:53:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~
CC (gcc) [M http_async_client.so]		http_async_client_mod.o
In file included from http_multi.h:40,
                 from async_http.h:48,
                 from http_async_client_mod.c:59:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~
CC (gcc) [M http_async_client.so]		http_multi.o
In file included from http_multi.h:40,
                 from http_multi.c:35:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~
LD (gcc) [M http_async_client.so]		http_async_client.so
CC (gcc) [M kazoo.so]		const.o
CC (gcc) [M kazoo.so]		kazoo.o
CC (gcc) [M kazoo.so]		kz_amqp.o
```

**4**
```
CC (gcc) [M sctp.so]		sctp_rpc.o
CC (gcc) [M sctp.so]		sctp_server.o
CC (gcc) [M sctp.so]		sctp_stats.o
sctp_server.c: In function 'sctp_handle_notification':
sctp_server.c:2314:48: warning: taking address of packed member of 'struct sctp_paddr_change' may result in an unaligned pointer value [-Waddress-of-packed-member]
 2314 |    strcpy(su_buf, su2a((union sockaddr_union *)&snp->sn_paddr_change
      |                                                ^~~~~~~~~~~~~~~~~~~~~
 2315 |              .spc_aaddr,
      |              ~~~~~~~~~~                         
LD (gcc) [M sctp.so]		sctp.so
CC (gcc) [M acc_radius.so]		acc_radius_mod.o
LD (gcc) [M acc_radius.so]		acc_radius.so
CC (gcc) [M auth_radius.so]		auth_radius.o
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2543
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201108/b5e38952/attachment.htm>


More information about the sr-dev mailing list