Commit 06f37043 authored by ndenoyelle's avatar ndenoyelle

error checking in CI and warning fix

parent edcd80ae
Pipeline #7924 passed with stages
in 5 minutes and 53 seconds
......@@ -28,6 +28,7 @@ make:generic:
- /^WIP.*/
script:
- ./autogen.sh
- export CFLAGS="-Wall -Wextra"
- mkdir build
- ./configure --prefix=`pwd`/build
- make
......
......@@ -14,17 +14,11 @@ AC_CONFIG_SRCDIR([include/aml.h])
AC_CONFIG_AUX_DIR([m4])
AC_CONFIG_MACRO_DIR([m4])
# automake should fail on any error
AM_INIT_AUTOMAKE([foreign subdir-objects 1.12])
AM_PROG_AR
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects 1.12])
# Detect features
#################
# Enable warnings in compilation flags
AM_CXXFLAGS="-Wall -Wextra"
AC_SUBST([AM_CXXFLAGS])
# check for programs
AC_LANG([C])
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
......
......@@ -33,7 +33,7 @@ extern int aml_errno;
* @param errno: the aml error number.
* Returns a static string describing the error.
**/
const char *aml_strerror(const int errno);
const char *aml_strerror(const int err);
/**
* Print error on standard error output.
......
......@@ -19,7 +19,8 @@ const char *aml_version_string = AML_VERSION_STRING;
int aml_errno;
int aml_init(int *argc, char **argv[])
int aml_init(__attribute__ ((unused)) int *argc,
__attribute__ ((unused)) char **argv[])
{
return 0;
}
......
AM_CFLAGS=${AM_CXXFLAGS} -I$(top_srcdir)/include
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
......
AM_CFLAGS=${AM_CXXFLAGS} -I$(top_srcdir)/include
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
......
AM_CFLAGS=${AM_CXXFLAGS} -I$(top_srcdir)/include
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamlscratch.la
......
AM_CFLAGS=${AM_CXXFLAGS} -I$(top_srcdir)/include
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamltiling.la
......
AM_CFLAGS=${AM_CXXFLAGS} -I$(top_srcdir)/include
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamlutils.la
......
......@@ -20,11 +20,11 @@ static const char * const aml_error_strings[] = {
[AML_ENOTSUP] = "Operation not supported",
};
const char *aml_strerror(const int errno)
const char *aml_strerror(const int err)
{
if (errno < 0 || errno >= AML_ERROR_MAX)
if (err < 0 || err >= AML_ERROR_MAX)
return "Unknown error";
return aml_error_strings[errno];
return aml_error_strings[err];
}
void aml_perror(const char *msg)
......
AM_COLOR_TESTS = yes
# add OpenMP to flags for test programs
AM_CFLAGS=${AM_CXXFLAGS} -I$(top_srcdir)/include
AM_CFLAGS=-I$(top_srcdir)/include
AM_LDFLAGS=../src/libaml.la
# valgrind support
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment