summary refs log tree commit diff
path: root/m4/disable-compiler-warnings.m4
blob: 2792722111bd6c264b02745b028f5746f33906e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
AC_DEFUN([DISABLE_COMPILER_WARNINGS], [
# Clang throws a lot of warnings when it does not understand a flag. Disable
# this warning for now so other warnings are visible.
AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#ifndef __clang__
	not clang
#endif
	]])],
	[CLANG=yes],
	[CLANG=no]
)
AC_MSG_RESULT([$CLANG])
AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Qunused-arguments])
CFLAGS="$CFLAGS $CLANG_FLAGS"
LDFLAGS="$LDFLAGS $CLANG_FLAGS"

# Removing the dependency on -Wno-pointer-sign should be a goal. These are
# largely unsigned char */char* mismatches in asn1 functions.
save_cflags="$CFLAGS"
CFLAGS=-Wno-pointer-sign
AC_MSG_CHECKING([whether CC supports -Wno-pointer-sign])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
	[AC_MSG_RESULT([yes])]
	[AM_CFLAGS=-Wno-pointer-sign],
	[AC_MSG_RESULT([no])]
)
CFLAGS="$save_cflags $AM_CFLAGS"
])
de inner double quotesHerbert Xu 2018-04-19parser: Fix parsing of ${}Herbert Xu 2018-04-19man: correct typos, iff -> ifMartijn Dekker 2018-04-19expand: Do not quote backslashes in unquoted parameter expansionHerbert Xu 2018-04-19shell: Add subdir-objects to AM_INIT_AUTOMAKEJason Bowen 2018-04-19eval: Restore input files in evalcommandHerbert Xu 2018-04-19eval: Reap zombies after built-in commands and functionsHerbert Xu 2018-04-19redir: Fix typo in noclobber codeHerbert Xu 2018-04-19expand: Fix glibc glob(3) supportHerbert Xu 2018-04-02expand: Fix buffer overflow in expandmetaHerbert Xu 2018-04-02builtin: Move echo space/nl handling into print_escape_strHerbert Xu 2018-04-02builtin: Fix echo performance regressionHerbert Xu 2018-04-02expand: Fix ghost fields with unquoted $@/$*Herbert Xu 2018-04-02parser: Allow newlines within parameter substitutionHerbert Xu 2018-04-02expand: Fix bugs with words connected to the right of $@Herbert Xu 2018-03-25Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"Herbert Xu 2018-03-22parser: Fix backquote support in here-document EOF markHerbert Xu