diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-27 09:03:51 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-27 09:03:51 +0200 |
| commit | 7c934801f88c640970ad41b5ddd39f4e39609f28 (patch) | |
| tree | 76a065db76fbcbdec818b8b6cc8b108ac1c9eb49 /src/nissy.h | |
| parent | 243a852d31483d10983c50978d1d4471efd0e553 (diff) | |
| download | nissy-core-7c934801f88c640970ad41b5ddd39f4e39609f28.tar.gz nissy-core-7c934801f88c640970ad41b5ddd39f4e39609f28.zip | |
Removed VLA notation from function parameters.
I found out that this gives undefined behavior when then size is 0.
Better not to have it at all, it is confusing for other developers anyway.
Diffstat (limited to '')
| -rw-r--r-- | src/nissy.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nissy.h b/src/nissy.h index 0447d66..0c1d18d 100644 --- a/src/nissy.h +++ b/src/nissy.h | |||
| @@ -276,7 +276,7 @@ long long | |||
| 276 | nissy_gendata( | 276 | nissy_gendata( |
| 277 | const char *solver, | 277 | const char *solver, |
| 278 | unsigned long long data_size, | 278 | unsigned long long data_size, |
| 279 | unsigned char data[data_size] | 279 | unsigned char *data |
| 280 | ); | 280 | ); |
| 281 | 281 | ||
| 282 | /* | 282 | /* |
| @@ -296,7 +296,7 @@ long long | |||
| 296 | nissy_checkdata( | 296 | nissy_checkdata( |
| 297 | const char *solver, | 297 | const char *solver, |
| 298 | unsigned long long data_size, | 298 | unsigned long long data_size, |
| 299 | const unsigned char data[data_size] | 299 | const unsigned char *data |
| 300 | ); | 300 | ); |
| 301 | 301 | ||
| 302 | /* | 302 | /* |
| @@ -352,9 +352,9 @@ nissy_solve( | |||
| 352 | unsigned optimal, | 352 | unsigned optimal, |
| 353 | unsigned threads, | 353 | unsigned threads, |
| 354 | unsigned long long data_size, | 354 | unsigned long long data_size, |
| 355 | const unsigned char data[data_size], | 355 | const unsigned char *data, |
| 356 | unsigned sols_size, | 356 | unsigned sols_size, |
| 357 | char sols[sols_size], | 357 | char *sols, |
| 358 | long long stats[static NISSY_SIZE_SOLVE_STATS], | 358 | long long stats[static NISSY_SIZE_SOLVE_STATS], |
| 359 | int (*poll_status)(void *), | 359 | int (*poll_status)(void *), |
| 360 | void *poll_status_data | 360 | void *poll_status_data |
