On Wed, Apr 29, 2026 at 09:28:56AM +1000, Seth McDonald wrote:
Regarding the use of unions vs pragmas here, it seems the preferred
method of suppressing the warning is still via pragmas, so I'll continue
their use.
that's fine.
Regarding the problematic cast, it may be better to perform it on return
rather than immediately. That is, retaining the const qualifier until
the return statement, at which point we remove it. This can add a
little more safety, as it ensures the value isn't modified within the
function. Any thoughts?
indeed, both glibc and musl do it like that.
notably, neither tries to suppress the warning. presumably, they are
both compiled without it.
And while we're modifying the local variables, I'd like to change their
type from u_char* to either unsigned char* or uint8_t*. If a typedef
must be used, I see no reason to use the nonstandard u_char when there's
the equivalent C-standard uint8_t.
i prefer my own "uchar" type from the top of common.h (which could be
plausibly inspired by qt). it's way less visually noisy than the
standard type and the long form.
this particular instance is simply an omission from 42cedc8f.
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel