URL:
https://github.com/SSSD/sssd/pull/5750
Title: #5750: fix compilation warnings
alexey-tikhonov commented:
"""
> About 2nd patch... Can't we just change signature of
`sss_getenv()` to `... const char **_value`? (CC @elkoniu)
I think the problem has philosophical nature. We are allocating data and modifying
pointer inside function so in fact it is not `const` even if we consider output data
pointed by it as `const`. Another issue is deallocation. I think when talloc will be
releasing the data with `free()` it will complain about const pointer.
No, I don't propose a const pointer to a char (`char * const`). I propose a pointer to
const char (`const char *`).
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5750#issuecomment-900213809