'Mark Rotteveel' via firebird-devel wrote 07.06.2024 18:11:
>>> dsc desc;
>>> getDesc(tdbb, csb, &desc);
>>
>> But variable desc is not used anywhere below and getDesc() function has no
>> side-effects. What does this code do?
>
> Are you sure it has no side-effects? I see potential paths where it can throw an
> exception, and it potentially does things in `arg1` and `arg2` that have
> side-effects depending on the implementation of those nodes (I didn't check, but
> I guess the could perform operations which might changes something in those nodes).
Which function do you look at? I see only this:
> void ParameterNode::getDesc(thread_db* /*tdbb*/, CompilerScratch* /*csb*/, dsc* desc)
> {
> *desc = message->format->fmt_desc[argNumber];
> // Must reset dsc_address because it's used in others places to read literals, but here it was
> // an offset in the message.
> desc->dsc_address = NULL;
> }
--
WBR, SD.