Skip to content

libsubdrivers: update for circ_buf_init change#26

Merged
lsf37 merged 2 commits into
masterfrom
lsf37/usb-cdc
Jun 11, 2026
Merged

libsubdrivers: update for circ_buf_init change#26
lsf37 merged 2 commits into
masterfrom
lsf37/usb-cdc

Conversation

@lsf37

@lsf37 lsf37 commented Jun 11, 2026

Copy link
Copy Markdown
Member

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 a flexible array that is 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.

The code is still unused, so it is also still untested, but I think I got at least the transformation right.

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>
@lsf37

lsf37 commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

(will push a style update after review)

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
@lsf37
lsf37 merged commit dfee9ca into master Jun 11, 2026
14 of 24 checks passed
@lsf37
lsf37 deleted the lsf37/usb-cdc branch June 11, 2026 23:15
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