]> git.proxmox.com Git - mirror_spl-debian.git/blobdiff - configure
Fix gcc configure warnings
[mirror_spl-debian.git] / configure
index f5c6a063a1db74528b9f10022f3964a94e94bcfb..6a322ce4edecb97162a30650a6624ad0c0eb4cc7 100755 (executable)
--- a/configure
+++ b/configure
@@ -11989,7 +11989,7 @@ int
 main (void)
 {
 
-               atomic64_t *ptr;
+               atomic64_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -12232,7 +12232,7 @@ int
 main (void)
 {
 
-               uintptr_t *ptr;
+               uintptr_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -12296,7 +12296,7 @@ int
 main (void)
 {
 
-               struct work_struct work;
+               struct work_struct work __attribute__ ((unused));
                INIT_WORK(&work, NULL, NULL);
 
   ;
@@ -12361,7 +12361,7 @@ int
 main (void)
 {
 
-               return register_sysctl_table(NULL,0);
+               (void) register_sysctl_table(NULL, 0);
 
   ;
   return 0;
@@ -12563,7 +12563,7 @@ int
 main (void)
 {
 
-               struct nameidata nd;
+               struct nameidata nd __attribute__ ((unused));
 
                nd.path.mnt = NULL;
                nd.path.dentry = NULL;
@@ -12738,7 +12738,7 @@ int
 main (void)
 {
 
-               struct ctl_table ctl;
+               struct ctl_table ctl __attribute__ ((unused));
                ctl.ctl_name = 0;
 
   ;
@@ -13124,7 +13124,9 @@ int
 main (void)
 {
 
-               struct timespec a, b, c = { 0 };
+               struct timespec a = { 0 };
+               struct timespec b = { 0 };
+               struct timespec c __attribute__ ((unused));
                c = timespec_sub(a, b);
 
   ;
@@ -13190,7 +13192,8 @@ int
 main (void)
 {
 
-               struct new_utsname *a = init_utsname();
+               struct new_utsname *a __attribute__ ((unused));
+               a = init_utsname();
 
   ;
   return 0;
@@ -13328,7 +13331,8 @@ main (void)
 {
 
                struct files_struct *files = current->files;
-               struct fdtable *fdt = files_fdtable(files);
+               struct fdtable *fdt __attribute__ ((unused));
+               fdt = files_fdtable(files);
 
   ;
   return 0;
@@ -13461,7 +13465,8 @@ int
 main (void)
 {
 
-               void *a = kmalloc_node(1, GFP_KERNEL, 0);
+               void *a __attribute__ ((unused));
+               a = kmalloc_node(1, GFP_KERNEL, 0);
 
   ;
   return 0;
@@ -13634,7 +13639,7 @@ int
 main (void)
 {
 
-               struct mutex mtx;
+               struct mutex mtx __attribute__ ((unused));
                mtx.owner = NULL;
 
   ;
@@ -14096,7 +14101,7 @@ int
 main (void)
 {
 
-               unsigned long state;
+               unsigned long state __attribute__ ((unused));
                state = global_page_state(0);
 
   ;
@@ -14162,7 +14167,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_FREE_PAGES;
 
   ;
@@ -14228,7 +14233,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE;
 
   ;
@@ -14293,7 +14298,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_ANON;
 
   ;
@@ -14358,7 +14363,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_FILE;
 
   ;
@@ -14424,7 +14429,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE;
 
   ;
@@ -14489,7 +14494,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_ANON;
 
   ;
@@ -14554,7 +14559,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_FILE;
 
   ;
@@ -15080,7 +15085,7 @@ int
 main (void)
 {
 
-               struct cred *cr;
+               struct cred *cr __attribute__ ((unused));
                cr  = NULL;
 
   ;
@@ -15462,6 +15467,152 @@ _ACEOF
        fi
 
 
+       { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5
+$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               return __invalidate_device(NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build
+       echo "obj-m := conftest.o" >build/Makefile
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_INVALIDATE_INODES 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5
+$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; }
+       grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \
+               $LINUX_OBJ/Module*.symvers 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \
+                               "$LINUX_OBJ/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_DCACHE_MEMORY 1
+_ACEOF
+
+               fi
+       else
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_DCACHE_MEMORY 1
+_ACEOF
+
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5
+$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; }
+       grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \
+               $LINUX_OBJ/Module*.symvers 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \
+                               "$LINUX_OBJ/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_ICACHE_MEMORY 1
+_ACEOF
+
+               fi
+       else
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_ICACHE_MEMORY 1
+_ACEOF
+
+       fi
+
+
  ;;
                 user)
 
@@ -15811,7 +15962,7 @@ int
 main (void)
 {
 
-               atomic64_t *ptr;
+               atomic64_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -16054,7 +16205,7 @@ int
 main (void)
 {
 
-               uintptr_t *ptr;
+               uintptr_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -16118,7 +16269,7 @@ int
 main (void)
 {
 
-               struct work_struct work;
+               struct work_struct work __attribute__ ((unused));
                INIT_WORK(&work, NULL, NULL);
 
   ;
@@ -16183,7 +16334,7 @@ int
 main (void)
 {
 
-               return register_sysctl_table(NULL,0);
+               (void) register_sysctl_table(NULL, 0);
 
   ;
   return 0;
@@ -16385,7 +16536,7 @@ int
 main (void)
 {
 
-               struct nameidata nd;
+               struct nameidata nd __attribute__ ((unused));
 
                nd.path.mnt = NULL;
                nd.path.dentry = NULL;
@@ -16560,7 +16711,7 @@ int
 main (void)
 {
 
-               struct ctl_table ctl;
+               struct ctl_table ctl __attribute__ ((unused));
                ctl.ctl_name = 0;
 
   ;
@@ -16946,7 +17097,9 @@ int
 main (void)
 {
 
-               struct timespec a, b, c = { 0 };
+               struct timespec a = { 0 };
+               struct timespec b = { 0 };
+               struct timespec c __attribute__ ((unused));
                c = timespec_sub(a, b);
 
   ;
@@ -17012,7 +17165,8 @@ int
 main (void)
 {
 
-               struct new_utsname *a = init_utsname();
+               struct new_utsname *a __attribute__ ((unused));
+               a = init_utsname();
 
   ;
   return 0;
@@ -17150,7 +17304,8 @@ main (void)
 {
 
                struct files_struct *files = current->files;
-               struct fdtable *fdt = files_fdtable(files);
+               struct fdtable *fdt __attribute__ ((unused));
+               fdt = files_fdtable(files);
 
   ;
   return 0;
@@ -17283,7 +17438,8 @@ int
 main (void)
 {
 
-               void *a = kmalloc_node(1, GFP_KERNEL, 0);
+               void *a __attribute__ ((unused));
+               a = kmalloc_node(1, GFP_KERNEL, 0);
 
   ;
   return 0;
@@ -17456,7 +17612,7 @@ int
 main (void)
 {
 
-               struct mutex mtx;
+               struct mutex mtx __attribute__ ((unused));
                mtx.owner = NULL;
 
   ;
@@ -17918,7 +18074,7 @@ int
 main (void)
 {
 
-               unsigned long state;
+               unsigned long state __attribute__ ((unused));
                state = global_page_state(0);
 
   ;
@@ -17984,7 +18140,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_FREE_PAGES;
 
   ;
@@ -18050,7 +18206,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE;
 
   ;
@@ -18115,7 +18271,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_ANON;
 
   ;
@@ -18180,7 +18336,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_FILE;
 
   ;
@@ -18246,7 +18402,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE;
 
   ;
@@ -18311,7 +18467,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_ANON;
 
   ;
@@ -18376,7 +18532,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_FILE;
 
   ;
@@ -18902,7 +19058,7 @@ int
 main (void)
 {
 
-               struct cred *cr;
+               struct cred *cr __attribute__ ((unused));
                cr  = NULL;
 
   ;
@@ -19284,6 +19440,152 @@ _ACEOF
        fi
 
 
+       { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5
+$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               return __invalidate_device(NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build
+       echo "obj-m := conftest.o" >build/Makefile
+       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_INVALIDATE_INODES 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5
+$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; }
+       grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \
+               $LINUX_OBJ/Module*.symvers 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \
+                               "$LINUX_OBJ/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_DCACHE_MEMORY 1
+_ACEOF
+
+               fi
+       else
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_DCACHE_MEMORY 1
+_ACEOF
+
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5
+$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; }
+       grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \
+               $LINUX_OBJ/Module*.symvers 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \
+                               "$LINUX_OBJ/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_ICACHE_MEMORY 1
+_ACEOF
+
+               fi
+       else
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK_ICACHE_MEMORY 1
+_ACEOF
+
+       fi
+
+