diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-10 14:06:43 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-10 14:06:43 +0200 |
| commit | 2e93de4ad102973961cb24d5b91f0c299763299f (patch) | |
| tree | 11eda6d4f0e3ab5ed41b8fc6d09820d6bb67f704 /src | |
| parent | 1ad46eda510e9709eaada046168811532929b9cb (diff) | |
| download | nissy-core-2e93de4ad102973961cb24d5b91f0c299763299f.tar.gz nissy-core-2e93de4ad102973961cb24d5b91f0c299763299f.zip | |
Small warning fixes to gendata
Diffstat (limited to 'src')
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index 3979a39..50ab01c 100644 --- 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) | |||
| 71 | 71 | ||
| 72 | cocsepsize = gendata_cocsep(arg->buf, arg->selfsim, arg->crep); | 72 | cocsepsize = gendata_cocsep(arg->buf, arg->selfsim, arg->crep); |
| 73 | 73 | ||
| 74 | cocsepdata_offset = (char *)arg->buf + INFOSIZE; | 74 | if (arg->buf == NULL) { |
| 75 | arg->cocsepdata = (uint32_t *)cocsepdata_offset; | 75 | cocsepdata_offset = NULL; |
| 76 | arg->h48buf = (char *)arg->buf + cocsepsize; | 76 | arg->cocsepdata = NULL; |
| 77 | arg->h48buf = NULL; | ||
| 78 | } else { | ||
| 79 | cocsepdata_offset = (char *)arg->buf + INFOSIZE; | ||
| 80 | arg->cocsepdata = (uint32_t *)cocsepdata_offset; | ||
| 81 | arg->h48buf = (char *)arg->buf + cocsepsize; | ||
| 82 | } | ||
| 77 | 83 | ||
| 78 | arg->base = 99; // TODO: set this somewhere else | 84 | arg->base = 99; // TODO: set this somewhere else |
| 79 | 85 | ||
| @@ -683,6 +689,7 @@ gendata_h48_derive(uint8_t h, const void *fulltable, void *buf) | |||
| 683 | 689 | ||
| 684 | /* Initializing values in case of error */ | 690 | /* Initializing values in case of error */ |
| 685 | /* TODO cleanup this */ | 691 | /* TODO cleanup this */ |
| 692 | fulltableinfo.h48h = 11; | ||
| 686 | fulltableinfo.bits = 2; | 693 | fulltableinfo.bits = 2; |
| 687 | fulltableinfo.base = 8; | 694 | fulltableinfo.base = 8; |
| 688 | 695 | ||
