From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

musl: ignore a false-positive warning in __rem_pio2_large.c

Gcc 12.1.1 warns that in __rem_pio2_large() - code which we take
directly from Musl - The local variable fq[0] may be used before set.
This shouldn't happen, because the fq[] array is set by a for loop
immediately before being used. There's one snag that gcc 12.1.1
correctly caught, however - this loop will not do anything if jz,
its start, is <0. However, this is an internal function that we assume
is called with correct parameters, and "prec" with the right values
will lead to one of the numbers in init_jk[] to be used to initialze jz,
and these are all positives.

Since I don't want to modify the musl code, let's just ignore the
warning in the Makefile.

Signed-off-by: Nadav Har'El <n...@scylladb.com>

---
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1170,6 +1170,7 @@ musl += math/__invtrigl.o
 musl += math/__polevll.o
 musl += math/__rem_pio2.o
 musl += math/__rem_pio2_large.o
+$(out)/musl/src/math/__rem_pio2_large.o: CFLAGS += -Wno-maybe-uninitialized
 musl += math/__rem_pio2f.o
 musl += math/__rem_pio2l.o
 musl += math/__signbit.o

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/000000000000158fd705e2551f1e%40google.com.

Reply via email to