Remove -Wno-ignored-attributes from fusl build
Many |foo64| symbols are implemented as weak aliases to |foo| via the
LFS64 macro. In a few cases, |foo| itself is also a weak alias to
|__foo|. The semantics of this are such that if |foo| itself is
overridden, |foo64| will still resolve to |__foo|. Clang warns about
this as it is potentially confusing. In these cases, we just write the
weak_alias directly.
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/1579273002 .
diff --git a/fusl/BUILD.gn b/fusl/BUILD.gn
index 2bef32e..5263eac 100644
--- a/fusl/BUILD.gn
+++ b/fusl/BUILD.gn
@@ -26,7 +26,6 @@
"-Werror=pointer-arith",
# Silent builds.
- "-Wno-ignored-attributes",
"-Wno-string-plus-int",
"-Wno-tautological-compare",
]
diff --git a/fusl/src/dirent/__getdents.c b/fusl/src/dirent/__getdents.c
index 1acd5a6..69076d2 100644
--- a/fusl/src/dirent/__getdents.c
+++ b/fusl/src/dirent/__getdents.c
@@ -9,4 +9,4 @@
weak_alias(__getdents, getdents);
-LFS64(getdents);
+weak_alias(__getdents, getdents64);
diff --git a/fusl/src/mman/mmap.c b/fusl/src/mman/mmap.c
index b85f25c..d51655a 100644
--- a/fusl/src/mman/mmap.c
+++ b/fusl/src/mman/mmap.c
@@ -34,4 +34,4 @@
weak_alias(__mmap, mmap);
-LFS64(mmap);
+weak_alias(__mmap, mmap64);
diff --git a/fusl/src/stat/statvfs.c b/fusl/src/stat/statvfs.c
index 30d5879..b9522e4 100644
--- a/fusl/src/stat/statvfs.c
+++ b/fusl/src/stat/statvfs.c
@@ -59,6 +59,6 @@
}
LFS64(statvfs);
-LFS64(statfs);
+weak_alias(__statfs, statfs64);
LFS64(fstatvfs);
-LFS64(fstatfs);
+weak_alias(__fstatfs, fstatfs64);
diff --git a/fusl/src/stdio/fseek.c b/fusl/src/stdio/fseek.c
index b160b74..4fb9afa 100644
--- a/fusl/src/stdio/fseek.c
+++ b/fusl/src/stdio/fseek.c
@@ -40,4 +40,4 @@
weak_alias(__fseeko, fseeko);
-LFS64(fseeko);
+weak_alias(__fseeko, fseeko64);
diff --git a/fusl/src/stdio/ftell.c b/fusl/src/stdio/ftell.c
index bb62897..fb7966f 100644
--- a/fusl/src/stdio/ftell.c
+++ b/fusl/src/stdio/ftell.c
@@ -34,4 +34,4 @@
weak_alias(__ftello, ftello);
-LFS64(ftello);
+weak_alias(__ftello, ftello64);