commit 2e93de4ad102973961cb24d5b91f0c299763299f
parent 1ad46eda510e9709eaada046168811532929b9cb
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Thu, 10 Oct 2024 14:06:43 +0200
Small warning fixes to gendata
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
@@ -71,9 +71,15 @@ gendata_h48(gendata_h48_arg_t *arg)
cocsepsize = gendata_cocsep(arg->buf, arg->selfsim, arg->crep);
- cocsepdata_offset = (char *)arg->buf + INFOSIZE;
- arg->cocsepdata = (uint32_t *)cocsepdata_offset;
- arg->h48buf = (char *)arg->buf + cocsepsize;
+ if (arg->buf == NULL) {
+ cocsepdata_offset = NULL;
+ arg->cocsepdata = NULL;
+ arg->h48buf = NULL;
+ } else {
+ cocsepdata_offset = (char *)arg->buf + INFOSIZE;
+ arg->cocsepdata = (uint32_t *)cocsepdata_offset;
+ arg->h48buf = (char *)arg->buf + cocsepsize;
+ }
arg->base = 99; // TODO: set this somewhere else
@@ -683,6 +689,7 @@ gendata_h48_derive(uint8_t h, const void *fulltable, void *buf)
/* Initializing values in case of error */
/* TODO cleanup this */
+ fulltableinfo.h48h = 11;
fulltableinfo.bits = 2;
fulltableinfo.base = 8;