-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Description
Internal CI testing on RHEL-7.9 popped up this build error for #1415:
gcc -MMD -MP -I../kmod/patch -Iinsn -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -g -Werror -c -o create-diff-object.o create-diff-object.c
create-diff-object.c: In function ‘kpatch_create_pfe_sections’:
create-diff-object.c:3831:4: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i=0; i<16; i++) {
^
create-diff-object.c:3831:4: note: use option -std=c99 or -std=gnu99 to compile your codeUp to now, we haven't merged any C99-isms like this into the code base, but it seems that default gcc options in distros like Fedora and the Ubuntu? github Travis CI must be assuming C99, so I never saw this error until the internal CI ran on RHEL-7.
A few things we could do:
- Add
-std=gnu99to kpatch-build Makefile - Add
-std=gnu89to kpatch-build/Makefile - Add
-std=gnu89test to .travis.yml to catch them earlier in the PR
Metadata
Metadata
Assignees
Labels
No labels