mirror of
https://github.com/transmission/transmission
synced 2025-02-21 21:57:01 +00:00
Remove duplicate -Wcast-align flag, add canonicalize_file_name function check
This commit is contained in:
parent
627555f47b
commit
e7382071d0
2 changed files with 14 additions and 14 deletions
|
@ -271,28 +271,27 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
|
||||
set(NEEDED_COMPILER_FLAGS
|
||||
-Wpointer-arith
|
||||
-Wcast-align
|
||||
-Wextra
|
||||
-Wfloat-equal
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-Wcast-align
|
||||
-Wundef
|
||||
-Wcast-align
|
||||
-Winit-self
|
||||
-Winline
|
||||
-Wmissing-declarations
|
||||
-Wmissing-format-attribute
|
||||
-Wpointer-arith
|
||||
-Wredundant-decls
|
||||
-Wundef
|
||||
-Wunused-parameter
|
||||
-Wwrite-strings
|
||||
-Winline
|
||||
-Wfloat-equal
|
||||
-Wextra
|
||||
-Winit-self
|
||||
-Wvariadic-macros)
|
||||
-Wvariadic-macros
|
||||
-Wwrite-strings)
|
||||
|
||||
set(NEEDED_C_COMPILER_FLAGS
|
||||
${NEEDED_COMPILER_FLAGS}
|
||||
-Wstrict-prototypes
|
||||
-Wdeclaration-after-statement
|
||||
-Wnested-externs
|
||||
-Wdeclaration-after-statement)
|
||||
-Wstrict-prototypes)
|
||||
string(REPLACE ";" " " NEEDED_C_COMPILER_FLAGS_STRING "${NEEDED_C_COMPILER_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NEEDED_C_COMPILER_FLAGS_STRING}")
|
||||
|
||||
|
@ -317,6 +316,7 @@ foreach(H ${NEEDED_HEADERS})
|
|||
endforeach()
|
||||
|
||||
set(NEEDED_FUNCTIONS
|
||||
canonicalize_file_name
|
||||
daemon
|
||||
fallocate64
|
||||
getmntent
|
||||
|
|
|
@ -75,7 +75,7 @@ AC_PROG_CXX
|
|||
AC_C_INLINE
|
||||
if test "x$GCC" = "xyes" ; then
|
||||
|
||||
CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Winline -Wfloat-equal"
|
||||
CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Winline -Wfloat-equal"
|
||||
|
||||
dnl figure out gcc version
|
||||
AC_MSG_CHECKING([gcc version])
|
||||
|
@ -99,7 +99,7 @@ AC_HEADER_STDC
|
|||
AC_HEADER_TIME
|
||||
|
||||
AC_CHECK_HEADERS([stdbool.h])
|
||||
AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll mkdtemp])
|
||||
AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename canonicalize_file_name strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll mkdtemp])
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
ACX_PTHREAD
|
||||
|
|
Loading…
Reference in a new issue