Add -Wall to build-example.sh

This commit is contained in:
Nigel Tao committed 2022-10-28 17:17:09 +11:00
1 parent 9445c8b9d0
commit c27250f52f
3 files changed
+6 -10

No files matched your search

+2 -2
View File
@@ -28,8 +28,8 @@ LDFLAGS=${LDFLAGS:-}
# The "-fdata-sections -ffunction-sections -Wl,--gc-sections" produces smaller
# binaries. See commit 41fce8a8 "Strip examples of unused data and functions".
CFLAGS=${CFLAGS:--O3 -fdata-sections -ffunction-sections -Wl,--gc-sections}
CXXFLAGS=${CXXFLAGS:--O3 -fdata-sections -ffunction-sections -Wl,--gc-sections}
CFLAGS=${CFLAGS:--O3 -fdata-sections -ffunction-sections -Wall -Wl,--gc-sections}
CXXFLAGS=${CXXFLAGS:--O3 -fdata-sections -ffunction-sections -Wall -Wl,--gc-sections}
mkdir -p gen/bin
+2 -4
View File
@@ -385,10 +385,8 @@ flush_dst() {
if (n == 0) {
break;
}
ssize_t i = fwrite(g_dst.reader_pointer(), 1, n, stdout);
if (i >= 0) {
g_dst.meta.ri += i;
}
size_t i = fwrite(g_dst.reader_pointer(), 1, n, stdout);
g_dst.meta.ri += i;
if (i < n) {
return "main: error writing to stdout";
}
+2 -4
View File
@@ -215,10 +215,8 @@ flush_dst() {
if (n == 0) {
break;
}
ssize_t i = fwrite(g_dst.reader_pointer(), 1, n, stdout);
if (i >= 0) {
g_dst.meta.ri += i;
}
size_t i = fwrite(g_dst.reader_pointer(), 1, n, stdout);
g_dst.meta.ri += i;
if (i < n) {
return "main: error writing to stdout";
}