Use near_get_be32 helper function to access nfc_data. Although there is
most likely no risk of unaligned access since nfc_data is allocated
from heap (and properly alligned as access starts from first byte) this
result in compilation error on ARM (Debian GCC 4.6.3).
plugins/snep-validation.c: In function ‘snep_validation_server_req_get’:
plugins/snep-validation.c:155:22: error: cast increases required alignment
of target type [-Werror=cast-align]
cc1: all warnings being treated as errors
make[1]: *** [plugins/snep-validation.o] Error 1
make: *** [all] Error 2
/* check if the acceptable length is higher than the data_len
* otherwise returns a NEAR_SNEP_RESP_EXCESS
*/
- acceptable_length = GUINT32_FROM_BE(*(uint32_t *)snep_data->nfc_data);
+ acceptable_length = near_get_be32(snep_data->nfc_data);
/* Look if there are some incoming ndef stored */
incoming_ndefs = g_hash_table_lookup(snep_validation_hash,