summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-12-03 12:57:07 +0000
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-12-03 12:58:52 +0000
commit229ea1ca5bce63cb52194dec1a932ba351f7aa64 (patch)
treedcb243fbc87b0ded8da38d809833d49dd21c46d1 /src/host/layer23/include/osmocom
parent271cdad401de897fed49c19897bf89359044457e (diff)
mobile: Fix compiler warning on printing ptrdiff_t
The "msg->tail - msg->l4h" subtract two unsigned char* pointers and should result in a ptrdiff_t. Fix the compiler warning by using "%ti" in the printf. Fixes: gsm411_sms.c: In function ‘gsm411_rx_rp_ud’: gsm411_sms.c:382:25: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=] LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^ /home/ich/install/openbsc/include/osmocom/core/logging.h:93:54: note: in definition of macro ‘LOGPSRCC’ logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ ^~~ /home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ‘LOGPSRC’ LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~~~~~ gsm411_sms.c:382:2: note: in expansion of macro ‘LOGP’ LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^~~~ gsm411_sms.c:382:25: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=] LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^ /home/ich/install/openbsc/include/osmocom/core/logging.h:95:53: note: in definition of macro ‘LOGPSRCC’ logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \ ^~~ /home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ‘LOGPSRC’ LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~~~~~ gsm411_sms.c:382:2: note: in expansion of macro ‘LOGP’ LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443
Diffstat (limited to 'src/host/layer23/include/osmocom')
0 files changed, 0 insertions, 0 deletions