Skip to content

Commit

Permalink
libvisual/lv_audio.c: Address warning -Wuninitialized
Browse files Browse the repository at this point in the history
Symptom was:
> ../../libvisual-0.4.2/libvisual/lv_audio.c:1111:2: error: variable 'signedcorr' is uninitialized when used here [-Werror,-Wuninitialized]
>         signedcorr += byte_max_numeric (size) / 2;
>         ^~~~~~~~~~
  • Loading branch information
hartwork committed Dec 23, 2024
1 parent 9604b7d commit b901060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvisual/libvisual/lv_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ static int transform_format_buffer_from_float (VisBuffer *dest, VisBuffer *src,
int signedcorr;
int i;

signedcorr += byte_max_numeric (size) / 2;
signedcorr = byte_max_numeric (size) / 2;

if (size == 1)
FORMAT_BUFFER_FROM_FLOAT(int8_t, uint8_t)
Expand Down

0 comments on commit b901060

Please sign in to comment.