Skip to content

Conversation

@cold-brewed
Copy link
Contributor

Summary

Cleaning up a bunch of ymfm warnings:

  • One such warning revolved around the YMF278B implementation. The index was based around a ternary which made gcc unhappy. Cleaned up by matching the official example (existing code did not match)
  • Another issue was cleaned up by adding a conditional to make gcc happy (this one resulted in several warnings)

In addition, all sprintfs were cleaned up to snprintfs to make clang happy. Since ymfm uses pointer arithmetic to write to the buffer a special macro had to be created to be passed to snprintf and properly calculate the remaining size. You'll see the macro as SNPRINTF_BUFFER_SIZE_CALC.

Checklist

  • I have discussed this with core contributors already

References

N/A

@richardg867 richardg867 merged commit 0e37602 into 86Box:master Aug 11, 2023
@cold-brewed cold-brewed deleted the ymfm-sprintf-fix branch August 11, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants