[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: crc: gcc warnings
From: |
Simon Josefsson |
Subject: |
Re: crc: gcc warnings |
Date: |
Fri, 01 Nov 2024 10:03:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Bruno Haible via Gnulib discussion list <bug-gnulib@gnu.org> writes:
> Hi Simon,
>
> Compiling a testdir of module 'crc' with "gcc -Wall", I see these warnings:
...
> I think that the proper fix is to change the prototypes of the 4 functions
> in crc.h from 'const char *buf' to 'const void *buf'. Just like memset(),
> memcmp(), etc. take 'void *', not 'char *', parameters.
>
> What do you think?
Ouch. Ideally maybe uint8_t should have been used, but both uint8_t and
void* is an API change compared to current char*. How about patching
test-crc.c to pass a char* to these functions, as they should receive?
/Simon
signature.asc
Description: PGP signature
- Re: crc: gcc warnings,
Simon Josefsson <=