rnatm

Load and structure data describing an atmosphere
git clone git://git.meso-star.fr/rnatm.git
Log | Files | Refs | README | LICENSE

commit 7edd9ecb74b9b54b66bb075913022b00a0d6761b
parent 1ddf7443c866002fb73cbe55470a8979c9518df8
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 25 Sep 2023 17:07:34 +0200

Fix compilation warning for test_rnatm executable

The sa_add function returns a pointer to the first element added to the
stretchy array. The caller can ignore it, but GCC warns him. Preceding
the call to sa_add with (void) makes GCC silent.

Diffstat:
Msrc/test_rnatm.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test_rnatm.c b/src/test_rnatm.c @@ -318,7 +318,7 @@ args_init(struct args* args, int argc, char** argv) while((opt = getopt(argc, argv, "a:cd:g:hi:Nn:o:s:T:t:V:v")) != -1) { switch(opt) { case 'a': - sa_add(args->rnatm.aerosols, 1); + (void)sa_add(args->rnatm.aerosols, 1); args->rnatm.aerosols[args->rnatm.naerosols] = RNATM_AEROSOL_ARGS_NULL; args->rnatm.naerosols += 1; res = cstr_parse_list(optarg, ':', parse_aerosol_parameters, args);