]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: add attributes to two functions without side effects
authorSamuel Tardieu <sam@rfc1149.net>
Fri, 5 Jan 2024 15:51:34 +0000 (16:51 +0100)
committerPádraig Brady <P@draigBrady.com>
Sat, 6 Jan 2024 15:42:44 +0000 (15:42 +0000)
commitf07f5b008f180a8b44f8007f7ef8fb7ba47fd7ce
tree6b57844d709eac2777cc66c81104aeca15c54996
parenta966dcdb69e2f49f2587e1b7d4ade7efcff29f40
maint: add attributes to two functions without side effects

* src/date.c (res_width): This function computes its result solely
from the value of its parameter and qualifies for the const attribute.
* src/tee.c (get_next_out): This function has no side effect and
qualifies for the pure attribute.
* THANKS.in: Remove duplicate now that author has a commit in the repo.

Those two functions were flagged by GCC 12.3.0,
though not by GCC 13.2.1.
THANKS.in
src/date.c
src/tee.c