From df057a11875e305065293f420e985bf66c839e2c Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Fri, 16 Feb 2024 20:42:47 +0100 Subject: [PATCH] slist.disconnect: -Wmaybe-uninitialized --- ci-all.sh | 7 +++++++ ctl/forward_list.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ci-all.sh b/ci-all.sh index 76ccfd67..54332661 100755 --- a/ci-all.sh +++ b/ci-all.sh @@ -4,12 +4,15 @@ make -j9 make -j4 CXX='g++ -std=c++03' CFLAGS=-I. make -j4 CXX='g++ -std=c++11' CFLAGS=-I. make -j4 CXX='g++ -std=c++17' CFLAGS=-I. +make -j4 CXX='g++ -std=c++20' CFLAGS=-I. +make -j4 CXX='g++ -std=c++23' CFLAGS=-I. make -j9 LONG=1 O0=1 SANITIZE=1 make -j9 LONG=1 O1=1 SANITIZE=1 make -j9 LONG=1 O2=1 SANITIZE=1 make -j9 LONG=1 O3=1 SANITIZE=1 make -j9 LONG=1 Og=1 SANITIZE=1 make -j9 LONG=1 Os=1 SANITIZE=1 +make -j9 DEBUG=1 make -j9 LONG=1 Ofast=1 make -j9 LONG=1 O0=1 SANITIZE=0 make -j9 LONG=1 O1=1 SANITIZE=0 @@ -20,12 +23,16 @@ make -j9 LONG=1 Os=1 SANITIZE=0 make -j9 LONG=1 Ofast=1 SANITIZE=0 make -j9 CC=gcc\ -std=c99 make -j9 CC=gcc\ -std=c11 +make -j9 CC=gcc\ -std=c17 +make -j9 CC=gcc\ -std=c2x make -j9 CXX='clang++ -stdlib=libc++' make -j9 CXX='clang++ -std=c++11 -stdlib=libc++' make -j9 CXX='clang++ -std=c++17 -stdlib=libc++' make -j9 CXX='clang++ -std=c++20 -stdlib=libc++' +make -j9 CXX='clang++ -std=c++23 -stdlib=libc++' make -j9 CC=clang CXX='clang++ -std=c++11' make -j9 CC=clang CXX='clang++ -std=c++17' make -j9 CC=clang CXX='clang++ -std=c++20' +make -j9 CC=clang CXX='clang++ -std=c++23' make examples SANITIZE=1 make examples SANITIZE=0 diff --git a/ctl/forward_list.h b/ctl/forward_list.h index f9b8b963..72ef12b2 100644 --- a/ctl/forward_list.h +++ b/ctl/forward_list.h @@ -243,7 +243,7 @@ static inline void JOIN(A, disconnect)(A *self, B *node) self->head = self->head->next; else { - B *prev; + B *prev = self->head; for (B *tail = self->head; tail != node; prev = tail, tail = tail->next) ; if (prev->next) // == node