oml: Fix compiler warning about aliasing
Make the fill_fom_hdr return the header and use it throughout.
CC abis_nm.o
In file included from ../../include/openbsc/debug.h:8:0,
from abis_nm.c:38:
abis_nm.c: In function ‘abis_nm_opstart’:
abis_nm.c:1763:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:23:74: note: in definition of macro ‘DEBUGP’
#define DEBUGP(ss, fmt, args...) logp(ss, __FILE__, __LINE__, 0, fmt, ## args)
^
abis_nm.c:1763:2: note: in expansion of macro ‘abis_nm_debugp_foh’
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
abis_nm.c:1763:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:23:74: note: in definition of macro ‘DEBUGP’
#define DEBUGP(ss, fmt, args...) logp(ss, __FILE__, __LINE__, 0, fmt, ## args)
^
abis_nm.c:1763:2: note: in expansion of macro ‘abis_nm_debugp_foh’
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
abis_nm.c:1763:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:23:74: note: in definition of macro ‘DEBUGP’
#define DEBUGP(ss, fmt, args...) logp(ss, __FILE__, __LINE__, 0, fmt, ## args)
^
abis_nm.c:1763:2: note: in expansion of macro ‘abis_nm_debugp_foh’
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
abis_nm.c:1763:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:23:74: note: in definition of macro ‘DEBUGP’
#define DEBUGP(ss, fmt, args...) logp(ss, __FILE__, __LINE__, 0, fmt, ## args)
^
abis_nm.c:1763:2: note: in expansion of macro ‘abis_nm_debugp_foh’
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
abis_nm.c:1763:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:23:74: note: in definition of macro ‘DEBUGP’
#define DEBUGP(ss, fmt, args...) logp(ss, __FILE__, __LINE__, 0, fmt, ## args)
^
abis_nm.c:1763:2: note: in expansion of macro ‘abis_nm_debugp_foh’
abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
1 file changed