The WT_CELL_LEN_CHK macro takes two parameters, t and len. It also assumes that two variable called dsk and end are available in scope. This looks like a mistake made during major refactoring. This ticket will add dsk and end as extra parameters to the macro (the macro body will remain unchanged).
If this macro had been written as an inline function instead, this issue could not have arisen, as the compiler would have detected that dsk and end were not declared.
- Does this affect any team outside of WT?
- How likely is it that this use case or problem will occur?
The code currently works correctly, but this problem has created code that is unnecessarily opaque,
- If the problem does occur, what are the consequences and how severe are they?
It increases the chance of bugs being introduced should the code be changed subsequently.
Acceptance Criteria (Definition of Done)
When the macro, and all calls to the macro, have been updated.
The fix is simple, and so existing PR and post-merge tests are sufficient.