1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-27 11:14:42 -05:00

Main: fix warnings in tests

This commit is contained in:
Alex Kotov 2022-02-02 08:09:54 +05:00
parent 03df12697e
commit dbe99b83be
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
7 changed files with 46 additions and 20 deletions

View file

@ -10,8 +10,7 @@ main_freebsd_task:
- pkg install --yes autoconf automake
main_build_script:
- ./autogen.sh
# FIXME: -Werror: unknown warning option '-Wno-cast-function-type'
- ./configure --enable-tests --disable-werror CFLAGS='-O3'
- ./configure --enable-tests CFLAGS='-O3'
- make
- sudo make install
main_test_script:
@ -26,8 +25,7 @@ mruby_freebsd_task:
- unzip mruby-3.0.0.zip
main_build_script:
- ./autogen.sh
# FIXME: -Werror: unknown warning option '-Wno-cast-function-type'
- ./configure --disable-werror CFLAGS='-O3'
- ./configure CFLAGS='-O3'
- make
- sudo make install
mruby_test_script:
@ -47,8 +45,7 @@ ruby_freebsd_task:
- sudo make install
main_build_script:
- ./autogen.sh
# FIXME: -Werror: unknown warning option '-Wno-cast-function-type'
- ./configure --disable-werror CFLAGS='-O3'
- ./configure CFLAGS='-O3'
- make
- sudo make install
ruby_build_script:
@ -70,8 +67,7 @@ rust_freebsd_task:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
main_build_script:
- ./autogen.sh
# FIXME: -Werror: unknown warning option '-Wno-cast-function-type'
- ./configure --disable-werror CFLAGS='-O3'
- ./configure CFLAGS='-O3'
- make
- sudo make install
rust_test_script:

View file

@ -13,12 +13,7 @@ jobs:
matrix:
# TODO: something is wrong with TCC, Multiboot 2 info tag struct size
#cc: ['gcc', 'clang', 'tcc']
cc:
- cc: 'gcc'
werror: ''
- cc: 'clang'
# FIXME: -Werror: unknown warning option '-Wno-cast-function-type'
werror: '--disable-werror'
cc: ['gcc', 'clang']
opt: ['', '-O0', '-O3']
steps:
- uses: actions/checkout@v2
@ -27,7 +22,7 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-tests ${{matrix.cc.werror}} CC='${{matrix.cc.cc}}' CFLAGS='${{matrix.opt}}'
run: ./configure --enable-tests CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
- name: make
run: make
- name: check

View file

@ -5,7 +5,6 @@ AM_CFLAGS = \
-pedantic \
-Wall \
-Wextra \
-Wno-cast-function-type \
-I$(top_builddir)/include \
-I$(top_srcdir)/include

View file

@ -5,10 +5,19 @@
#include <kernaux/multiboot2.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include "multiboot2_header_example1.h"
static void my_printf(const char *format, ...)
{
va_list va;
va_start(va, format);
vprintf(format, va);
va_end(va);
}
int main()
{
assert(KernAux_Multiboot2_Header_is_valid(
@ -17,7 +26,7 @@ int main()
KernAux_Multiboot2_Header_print(
(struct KernAux_Multiboot2_Header*)&multiboot2_header_example1,
(void (*)(const char *format, ...))printf
my_printf
);
return 0;

View file

@ -5,10 +5,19 @@
#include <kernaux/multiboot2.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include "multiboot2_header_example2.h"
static void my_printf(const char *format, ...)
{
va_list va;
va_start(va, format);
vprintf(format, va);
va_end(va);
}
int main()
{
assert(KernAux_Multiboot2_Header_is_valid(
@ -17,7 +26,7 @@ int main()
KernAux_Multiboot2_Header_print(
&multiboot2_header_example2.multiboot2_header,
(void (*)(const char *format, ...))printf
my_printf
);
return 0;

View file

@ -5,10 +5,19 @@
#include <kernaux/multiboot2.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include "multiboot2_info_example1.h"
static void my_printf(const char *format, ...)
{
va_list va;
va_start(va, format);
vprintf(format, va);
va_end(va);
}
int main()
{
assert(KernAux_Multiboot2_Info_is_valid(
@ -17,7 +26,7 @@ int main()
KernAux_Multiboot2_Info_print(
(struct KernAux_Multiboot2_Info*)multiboot2_info_example1,
(void (*)(const char *format, ...))printf
my_printf
);
return 0;

View file

@ -5,10 +5,19 @@
#include <kernaux/multiboot2.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include "multiboot2_info_example2.h"
static void my_printf(const char *format, ...)
{
va_list va;
va_start(va, format);
vprintf(format, va);
va_end(va);
}
int main()
{
assert(KernAux_Multiboot2_Info_is_valid(
@ -17,7 +26,7 @@ int main()
KernAux_Multiboot2_Info_print(
&multiboot2_info_example2.multiboot2_info,
(void (*)(const char *format, ...))printf
my_printf
);
return 0;