https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109293
Bug ID: 109293
Summary: Missing memmem() prototype in fixincludes/fixfixes.c
on Windows/MinGW-W64
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: build
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: jdx at o2 dot pl
Target Milestone: ---
Host: x86_64-w64-mingw32
Created attachment 54763
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54763&action=edit
Proposed patch
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute
-Wno-overlength-strings -pedantic -Wno-long-long -DHAVE_CONFIG_H -I.
-I../../../gcc/fixincludes -I../include -I../../../gcc/fixincludes/../include
../../../gcc/fixincludes/fixfixes.c
../../../gcc/fixincludes/fixfixes.c: In function 'check_has_inc':
../../../gcc/fixincludes/fixfixes.c:490:12: warning: implicit declaration of
function 'memmem'; did you mean 'memset'? [-Wimplicit-function-declaration]
490 | for (p = memmem (begin, pos - begin, has_inc, has_inc_len);
| ^~~~~~
| memset
../../../gcc/fixincludes/fixfixes.c:490:10: warning: assignment to 'const char
*' from 'int' makes pointer from integer without a cast [-Wint-conversion]
490 | for (p = memmem (begin, pos - begin, has_inc, has_inc_len);
| ^
../../../gcc/fixincludes/fixfixes.c:492:10: warning: assignment to 'const char
*' from 'int' makes pointer from integer without a cast [-Wint-conversion]
492 | p = memmem (p, pos - p, has_inc, has_inc_len))
| ^