Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: check more public headers for pedantic warnings #1194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ jobs:
- name: Check public headers conform to ISO standards with pedantic warnings
if: ${{matrix.builds == 'mlibc-headers-only'}}
working-directory: build/
shell: bash
run: |
shopt -s globstar
GCC_ARCH="${{matrix.arch}}"
case "$GCC_ARCH" in
"x86")
GCC_ARCH="i686"
;;
esac
ALL_INCLUDES="-- -include\0%s\0 packages/${{matrix.builds}}/usr/include/**.h"
ALL_INCLUDES="-- -include\0%s\0 packages/${{matrix.builds}}/usr/include/**/*.h"
GCC_ARGS="-S /dev/null -o /dev/null -I packages/${{matrix.builds}}/usr/include -I packages/linux-headers/usr/include -nostdlib -Werror -Wpedantic -Wsystem-headers"
GCC_C_ARGS="$GCC_ARCH-linux-mlibc-gcc -x c $GCC_ARGS"
GCC_CXX_ARGS="$GCC_ARCH-linux-mlibc-g++ -x c++ $GCC_ARGS"
Expand Down
4 changes: 4 additions & 0 deletions options/glibc/include/net/ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ extern "C" {
#endif

#if __MLIBC_LINUX_OPTION
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wvariadic-macros"
#pragma GCC diagnostic ignored "-Wpedantic"
# include <linux/if_ether.h>
#pragma GCC diagnostic pop
#endif /* __MLIBC_LINUX_OPTION */

#define ETHERTYPE_PUP 0x0200
Expand Down
4 changes: 2 additions & 2 deletions options/glibc/include/sys/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#define ES 24
#define FS 25
#define GS 26
#else
#error "Add architecture specific code here"
#elif !(defined(__i386__) || defined(__riscv) || defined(__aarch64__) || defined(__m68k__))
#error "Missing architecture specific code."
#endif

#endif