Skip to content
Snippets Groups Projects
Commit 1b005047 authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

Suppress unaligned cast warning in decmp.c

parent 5616a131
No related branches found
No related tags found
1 merge request!34Update cmp_tool to version v0.13
...@@ -2188,6 +2188,7 @@ static long parse_cmp_collection(uint8_t *cmp_col, int n, struct cmp_cfg *cfg, i ...@@ -2188,6 +2188,7 @@ static long parse_cmp_collection(uint8_t *cmp_col, int n, struct cmp_cfg *cfg, i
uint32_t cmp_data_size; /* size of the compressed data in the collection (not including the header) */ uint32_t cmp_data_size; /* size of the compressed data in the collection (not including the header) */
uint16_t original_col_size; /* size of the decompressed collection data (not including the header) */ uint16_t original_col_size; /* size of the decompressed collection data (not including the header) */
size_t sample_size; size_t sample_size;
void *void_poiter; /* used to suppress unaligned cast warning */
/* get to the collection we want to decompress */ /* get to the collection we want to decompress */
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
...@@ -2211,7 +2212,8 @@ static long parse_cmp_collection(uint8_t *cmp_col, int n, struct cmp_cfg *cfg, i ...@@ -2211,7 +2212,8 @@ static long parse_cmp_collection(uint8_t *cmp_col, int n, struct cmp_cfg *cfg, i
else else
*coll_uncompressed = 0; *coll_uncompressed = 0;
cfg->icu_output_buf = (void *)(col_hdr); /* unaligned cast -> reading compressed data as uint8_t * */ void_poiter = (void *)(col_hdr); /* unaligned cast -> reading compressed data as uint8_t * */
cfg->icu_output_buf = void_poiter;
cfg->buffer_length = cmp_data_size + COLLECTION_HDR_SIZE; cfg->buffer_length = cmp_data_size + COLLECTION_HDR_SIZE;
cfg->data_type = convert_subservice_to_cmp_data_type(cmp_col_get_subservice(col_hdr)); cfg->data_type = convert_subservice_to_cmp_data_type(cmp_col_get_subservice(col_hdr));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment