samples: google_iot_mqtt: Explicitly cast socklen_t to int in printf

Otherwise, it can lead to warning like:

main.c:80:10: warning: format '%d' expects argument of type 'int',
but argument 2 has type 'socklen_t' {aka 'long unsigned int'}
[-Wformat=]

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2019-05-10 23:14:27 +03:00 committed by Jukka Rissanen
commit 6f6b46971a

View file

@ -77,7 +77,7 @@ top:
LOG_DBG(" family : %d", addr->ai_family); LOG_DBG(" family : %d", addr->ai_family);
LOG_DBG(" socktype: %d", addr->ai_socktype); LOG_DBG(" socktype: %d", addr->ai_socktype);
LOG_DBG(" protocol: %d", addr->ai_protocol); LOG_DBG(" protocol: %d", addr->ai_protocol);
LOG_DBG(" addrlen : %d", addr->ai_addrlen); LOG_DBG(" addrlen : %d", (int)addr->ai_addrlen);
/* Assume two words. */ /* Assume two words. */
LOG_DBG(" addr[0]: 0x%lx", ((uint32_t *)addr->ai_addr)[0]); LOG_DBG(" addr[0]: 0x%lx", ((uint32_t *)addr->ai_addr)[0]);