]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
Annotate intentional writes of const-qualified data (CID #1508484, #1517674) (#4872)
authorJames Jones <jejones3141@gmail.com>
Fri, 31 Mar 2023 22:03:53 +0000 (17:03 -0500)
committerGitHub <noreply@github.com>
Fri, 31 Mar 2023 22:03:53 +0000 (16:03 -0600)
commit85681dcb9ce45021fab6ac5a092e36f26821c3e4
tree39be637bc0d2fde58ce72dd999e075b9179b19f6
parentdfeaa2f0243e8878a98d83eaa94948d4a1c0e39d
Annotate intentional writes of const-qualified data (CID #1508484, #1517674) (#4872)

Certain members of fr_value_box_t and hence of fr_pair_t have
const-qualified type, so pair_init_from_da() and fr_value_box_init(),
which modify some of those members, coverity points them out.
(UNCONST() placates the compiler, but not coverity.)

The coverity primitives that one might think would apply here,
__coverity_write_buffer_{bytes, elements}__(), are said to relate
mostly to checkers unrelated to writes to const-qualified fields,
so we annotate.
src/lib/util/pair.c
src/lib/util/value.h