-
-
Notifications
You must be signed in to change notification settings - Fork 233
Simplify Clumplet Reader/Writer + code analysis issues #8507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify Clumplet Reader/Writer + code analysis issues #8507
Conversation
Improve [[noreturn]] and noexcept annotations
@@ -437,6 +440,9 @@ void ClumpletWriter::insertBytesLengthCheck(UCHAR tag, const void* bytes, const | |||
cur_offset += 4; | |||
} | |||
break; | |||
default: | |||
invalid_structure("invalid length size", lenSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lenSize is set only by our code, please remove this default label, use fb_assert() instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean fb_assert(false)
here in the default branch, or adding fb_assert(lenSize >= 0 && lenSize <= 2 || lenSize == 4)
earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now I pushed a change with the second assert I mentioned in the switch; do you think that it's OK, or do you want it moved outside the switch, or as fb_assert(false)
?
@AlexPeshkoff Do you want me to make any other changes. BTW: I suggest squash-merging this for a cleaner history. |
On 4/10/25 12:16, Mark Rotteveel wrote:
@AlexPeshkoff <https://github.com/AlexPeshkoff> Do you want me to make
any other changes.
BTW: I suggest squash-merging this for a cleaner history.
—
Reply to this email directly, view it on GitHub
<#8507 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA44OUPHAGAZNWHJIPWGPP32YYZHPAVCNFSM6AAAAAB2VOMJVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOJSGEYDAOJWGI>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
BTW: I suggest squash-merging this for a cleaner history.
I almost always prerer that way, details of how solution was taken
typically makes no interest.
|
From out of curiocity what/where this term "Clumpet" comes from and/or mean, in this context? Google gave me an answers that where more confusing than informative 😄 |
It's clumplet, not clumpet; I believe it is a word made up by Jim Starkey (not 100% sure though), and I think you should read it as "[a collection of] small clumps of bytes", as in "-let" being a diminutive, and clumps of bytes (compare clumps of clay) for the contents of the buffer. That said, I might just read too much in it. |
Not by Jim Starkey but by Nickolay Samofatov . |
Header page clumplets exist in the InterBase 6.0 source code, so I believe credits really belong to Jim ;-) Nickolay just extended the term to various API parameter buffers. |
@AlexPeshkoff Anything else, or can I merge it? |
OK to merge |
Uses isTagged() instead of having three or four different ways of discerning tagged vs untagged (in some cases, missing some kinds). Some code cleanup, annotating [[noreturn]]/noexcept, addressing switch code analysis warnings.
Also fixes a bug where ClumpletWriter.reset(...) shouldn't work for tagged buffers (apparently not happening in production code?)