Commit 358049a3 authored by Guillaume Charifi's avatar Guillaume Charifi
Browse files

Fix some unused parameter & type punning-related warnings.



Signed-off-by: Guillaume Charifi's avatarGuillaume Charifi <guillaume.charifi@sfr.fr>
parent 60d0dae2
Pipeline #2422 failed with stage
in 4 seconds
......@@ -138,6 +138,8 @@ static int handle_launch(struct parse_state *state, const char *str)
struct loader_context *ctx = &state->ctx;
int result;
(void)str;
result = state->launch_cb(&state->ctx, state->launch_cb_arg);
// Params can be kept between sims
......@@ -193,6 +195,8 @@ static void handle_field(void *str, size_t size, void *state_)
{
struct parse_state *state = state_;
(void)size;
if (state->err != LOADER_ERROR_NONE)
return;
......@@ -219,6 +223,8 @@ static void handle_record_end(int c, void *state_)
{
struct parse_state *state = state_;
(void)c;
if (state->err != LOADER_ERROR_NONE)
return;
......
......@@ -100,7 +100,8 @@ static inline float randf_norm_ieee754_unsafe(void)
r = ((0 + 127) << 23) | (r & 0x7FFFFFul);
/* 1.f <= r < 2.f */
return *(float *)&r - 1.f;
char *pr = (char *)&r;
return *(float *)pr - 1.f;
}
/* Resolution: 2^23 distinct values inside [-1.f, 1.f[ */
......@@ -110,7 +111,8 @@ static inline float randf_snorm_ieee754_unsafe(void)
r = ((1 + 127) << 23) | (r & 0x7FFFFFul);
/* 2.f <= r < 4.f */
return *(float *)&r - 3.f;
char *pr = (char *)&r;
return *(float *)pr - 3.f;
}
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment