libsubdrivers: update for circ_buf_init change#26
Merged
Conversation
Commit e724ab41187 in util_libs changed circ_buf_new into circ_buf_init. Commit a726483dbd6 in util_libs before that removed the parameter and made the buffer part of the circ_buf_t struct. Both commits are from 2017, and the only reason this code here compiled since then is that it was unused, because gcc <14 accepted the undeclared function as implicit function declarations and linking succeed when they were not used. To fix the build, use the "new" circ_buf_t/cir_buf_init() API. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Member
Author
|
(will push a style update after review) |
Indanz
approved these changes
Jun 11, 2026
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit e724ab41187 in
util_libschangedcirc_buf_newintocirc_buf_init. Commit a726483dbd6 inutil_libsbefore that removed the parameter and made the buffer a flexible array that is part of thecirc_buf_tstruct. Both commits are from 2017, and the only reason this code here compiled since then is that it was unused, because gcc <14 accepted the undeclared function as implicit function declarations and linking succeed when they were not used.To fix the build, use the "new"
circ_buf_t/cir_buf_init()API.The code is still unused, so it is also still untested, but I think I got at least the transformation right.