diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-07 08:38:25 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-07 10:30:51 -0700 |
commit | 32f9929109e2858b81403f2cbb2a80774f822859 (patch) | |
tree | 0a5a1095f4c2e0f5c6d2c5d9bc42f1e3f779fdfd /commit.h | |
parent | b31607a3e03b2002c468c16bb71fcaf2d1846e09 (diff) |
ident: add casts for fallback name and GECOS
In `xgetpwuid_self()`, we return a fallback identity when it was not
possible to look up the current identity. This fallback identity needs
to be internal and must never be written to by the calles as specified
by getpwuid(3P). As both the `pw_name` and `pw_gecos` fields are marked
as non-constant though, it will cause a warning to assign constant
strings to them once compiling with `-Wwrite-strings`.
Add explicit casts to avoid the warning.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions