]> granicus.if.org Git - transmission/commitdiff
Remove duplicate -Wcast-align flag, add canonicalize_file_name function check
authorMike Gelfand <mikedld@mikedld.com>
Sat, 6 Dec 2014 16:28:53 +0000 (16:28 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Sat, 6 Dec 2014 16:28:53 +0000 (16:28 +0000)
CMakeLists.txt
configure.ac

index 7abb0ef92b778a2a35f8681e70fab251f194efb1..3b0b9b956497d7f6c68162360383a2e358df15a2 100644 (file)
@@ -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
index ccd659442768194b5b674ef1310c4a5bc732929f..fa699f8aa2198b38226c76d50fb8ac84845b7392 100644 (file)
@@ -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