mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
BUILD: tools: memchr definition changed in C23
New gcc and clang versions from fedora rawhide seems to use the C23
standard by default. This version changes the definition of some
string.h functions, which now return a const char * instead of a char *.
src/tools.c: In function ‘fgets_from_mem’:
src/tools.c:7200:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
7200 | new_pos = memchr(*position, '\n', size);
| ^
Strangely, -Wdiscarded-qualifiers does not seem to catch all the
memchr.
Should fix issue #3228.
This could be backported in previous versions.
This commit is contained in:
parent
5322bd3785
commit
4aff6d1c25
1 changed files with 1 additions and 1 deletions
|
|
@ -7182,7 +7182,7 @@ REGISTER_PER_THREAD_INIT(init_tools_per_thread);
|
|||
*/
|
||||
char *fgets_from_mem(char* buf, int size, const char **position, const char *end)
|
||||
{
|
||||
char *new_pos;
|
||||
const char *new_pos;
|
||||
int len = 0;
|
||||
|
||||
/* keep fgets behaviour */
|
||||
|
|
|
|||
Loading…
Reference in a new issue