commit 7647c77bb0c6f6faa2f9b36d69ba539a38f247b1
parent da100ddb217651ac2c8ea8a2c0ae71c5a7587385
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 2 Mar 2023 16:50:23 +0100
Fix a compilation warning detected by GCC 12
Either way, it seems like a false warning. The compiler notifies that a
variable can be used uninitialized but in fact, as far as one can
imagine, there is no way this situation could happen. Anyway, we
initialize this offending variable when it is declared, so that GCC stay
quiet.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test_sdis_solve_medium.c b/src/test_sdis_solve_medium.c
@@ -228,7 +228,7 @@ main(int argc, char** argv)
struct sdis_solve_medium_args solve_args = SDIS_SOLVE_MEDIUM_ARGS_DEFAULT;
struct ssp_rng* rng = NULL;
struct context ctx;
- double ref;
+ double ref = 0;
double v, v0, v1;
size_t nreals;
size_t nfails;