FNA-XNA / FAudio

FAudio - Accuracy-focused XAudio reimplementation for open platforms
https://fna-xna.github.io/
Other
534 stars 72 forks source link

warning: expression result un used [-Wunused-value] #324

Closed rfht closed 7 months ago

rfht commented 8 months ago

With clang:

In file included from /usr/ports/pobj/faudio-23.11/FNA/lib/FAudio/src/XNA_Song.c:83:
/usr/ports/pobj/faudio-23.11/FNA/lib/FAudio/src/qoa_decoder.h:519:2: warning: expression result un
used [-Wunused-value]
        sample_count;
        ^~~~~~~~~~~~
1 warning generated.

https://github.com/FNA-XNA/FAudio/blob/632a8e5e233026a42974986b77b131c4a8a60444/src/qoa_decoder.h#L519

I'm not sure if I'm missing something... These are the lines dealing with sample_count here:

509: unsigned int frame_count, sample_index, sample_count;
[...]
519: sample_count;
[...]
524: sample_count = qoa_decode_next_frame(qoa, sample_ptr);
525: sample_index += sample_count;

Seems to me like line 519 doesn't do anything... Should this be removed, or is it incomplete?