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

Small bug fixing

parent 9579fdc7
Branches
Tags
1 merge request!26Adapt cmp_tool to the chunk decompression
......@@ -28,11 +28,11 @@
#include "../common/cmp_data_types.h"
struct cmp_max_used_bits *cmp_max_used_bits_list_get(uint8_t version);
const struct cmp_max_used_bits *cmp_max_used_bits_list_get(uint8_t version);
int cmp_max_used_bits_list_add(struct cmp_max_used_bits const *item);
int cmp_max_used_bits_list_delet(uint8_t version);
void cmp_max_used_bits_list_delet(uint8_t version);
void cmp_max_used_bits_list_empty(void);
......
......@@ -542,7 +542,7 @@ int rdcu_inject_edac_error(const struct cmp_cfg *cfg, uint32_t addr)
/* It looks like there is a bug when displaying the bypass status of the 2. and 4. SRAM chip. */
if (2 != sub_chip_die_addr && 4 != sub_chip_die_addr)
#endif
if (0 == rdcu_edac_get_bypass_status()) {
if (rdcu_edac_get_bypass_status() == 0) {
printf("Error: bypass status unexpected !\n");
return -1;
}
......
......@@ -71,7 +71,7 @@ void set_tc_folder_dir(const char *dir_name)
* @see https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
*/
static FILE *open_file(const char *dir_name, int n_tc)
static FILE *open_file_tc(const char *dir_name, int n_tc)
{
char *pathname;
FILE *fp;
......@@ -162,7 +162,7 @@ static int32_t rmap_tx_to_file(const void *hdr, uint32_t hdr_size,
return -1;
}
fp = open_file(tc_folder_dir, n_pkt);
fp = open_file_tc(tc_folder_dir, n_pkt);
if (fp == NULL) {
perror("fopen()");
......
......@@ -63,7 +63,7 @@ void* malloc(size_t size)
void test_cmp_max_used_bits_list(void)
{
struct cmp_max_used_bits i_32, i_34, i_35, i_36, i_255, i_0;
struct cmp_max_used_bits *p;
const struct cmp_max_used_bits *p;
int return_val;
/* set up max_used_bits item */
......
......@@ -1043,7 +1043,7 @@ void test_decompress_imagette_model(void)
uint16_t data[5] = {0};
uint16_t model[5] = {0, 1, 2, 3, 4};
uint16_t up_model[5] = {0};
uint32_t cmp_data[] = {0};
uint32_t cmp_data[2] = {0};
struct cmp_cfg cfg = {0};
struct bit_decoder dec;
int err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment