From 7c934801f88c640970ad41b5ddd39f4e39609f28 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 27 May 2025 09:03:51 +0200 Subject: 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. --- src/nissy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nissy.c') diff --git a/src/nissy.c b/src/nissy.c index aaa5c2a..3190e55 100644 --- a/src/nissy.c +++ b/src/nissy.c @@ -215,7 +215,7 @@ long long nissy_gendata( const char *solver, unsigned long long data_size, - unsigned char data[data_size] + unsigned char *data ) { return nissy_gendata_unsafe(solver, data_size, data); @@ -253,7 +253,7 @@ long long nissy_checkdata( const char *solver, unsigned long long data_size, - const unsigned char data[data_size] + const unsigned char *data ) { solver_dispatch_t *dispatch; @@ -278,9 +278,9 @@ nissy_solve( unsigned optimal, unsigned threads, unsigned long long data_size, - const unsigned char data[data_size], + const unsigned char *data, unsigned sols_size, - char sols[sols_size], + char *sols, long long stats[static NISSY_SIZE_SOLVE_STATS], int (*poll_status)(void *), void *poll_status_data -- cgit v1.3