diff --git a/configure.ac b/configure.ac index 49e37e2..45c7f3d 100644 --- a/configure.ac +++ b/configure.ac @@ -179,6 +179,8 @@ AX_CHECK_COMPILE_FLAG([-Werror=implicit-function-declaration], [CFLAGS="$CFLAGS AX_CHECK_COMPILE_FLAG([-Wmissing-declarations], [CFLAGS="$CFLAGS -Wmissing-declarations"], [], [-Werror]) AX_CHECK_COMPILE_FLAG([-Wunused-function], [CFLAGS="$CFLAGS -Wunused-function"], [], [-Werror]) AX_CHECK_COMPILE_FLAG([-Wunused-variable], [CFLAGS="$CFLAGS -Wunused-variable"], [], [-Werror]) +# Useful to catch non-standard constructs. +AX_CHECK_COMPILE_FLAG([-Wpedantic], [CFLAGS="$CFLAGS -Wpedantic"], [], [-Werror]) dnl Treat warnings as errors AC_ARG_ENABLE([werror], diff --git a/src/encoder/formats.c_template b/src/encoder/formats.c_template index 8ffdc79..6e7700f 100644 --- a/src/encoder/formats.c_template +++ b/src/encoder/formats.c_template @@ -22,7 +22,7 @@ #include "encoder/encoder.h" #include "encoder/EMInst.h" -static char *formatName[]; +static char *formatName[NUM_FORMATS+1]; char *instFormatName(InstID instID) {