public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? @ 2021-08-26 9:19 dcb314 at hotmail dot com 2021-08-26 12:16 ` [Bug libstdc++/102074] " redi at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: dcb314 at hotmail dot com @ 2021-08-26 9:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102074 Bug ID: 102074 Summary: include/bits/atomic_timed_wait.h:215: possible missing return ? Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- libstdc++-v3/include/bits/atomic_timed_wait.h:215:6: error: Found a exit path from function with non-void return type that has missing return statement [missingReturn] Source code is { #ifdef _GLIBCXX_HAVE_PLATFORM_TIMED_WAIT return __platform_wait_until(__addr, __old, __atime); #else __platform_wait_t __val; __atomic_load(__addr, &__val, __ATOMIC_RELAXED); if (__val == __old) { lock_guard<mutex> __l(_M_mtx); return __cond_wait_until(_M_cv, _M_mtx, __atime); } #endif // _GLIBCXX_HAVE_PLATFORM_TIMED_WAIT } I see no code for __val != __old, not even some rarely executed error handling code. Static analyser cppcheck found this possible problem. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/102074] include/bits/atomic_timed_wait.h:215: possible missing return ? 2021-08-26 9:19 [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? dcb314 at hotmail dot com @ 2021-08-26 12:16 ` redi at gcc dot gnu.org 2021-08-28 10:19 ` redi at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2021-08-26 12:16 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102074 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2021-08-26 Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rodgertq at gcc dot gnu.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/102074] include/bits/atomic_timed_wait.h:215: possible missing return ? 2021-08-26 9:19 [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? dcb314 at hotmail dot com 2021-08-26 12:16 ` [Bug libstdc++/102074] " redi at gcc dot gnu.org @ 2021-08-28 10:19 ` redi at gcc dot gnu.org 2021-08-31 16:46 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2021-08-28 10:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102074 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- N.B. I have a local work-in-progress patch for PR 50871 which would have prevented this. I should finish that work. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/102074] include/bits/atomic_timed_wait.h:215: possible missing return ? 2021-08-26 9:19 [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? dcb314 at hotmail dot com 2021-08-26 12:16 ` [Bug libstdc++/102074] " redi at gcc dot gnu.org 2021-08-28 10:19 ` redi at gcc dot gnu.org @ 2021-08-31 16:46 ` cvs-commit at gcc dot gnu.org 2021-10-12 10:58 ` cvs-commit at gcc dot gnu.org 2022-01-16 1:16 ` rodgertq at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-08-31 16:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102074 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:763eb1f19239ebb19c0f87590a4f02300c02c52b commit r12-3263-g763eb1f19239ebb19c0f87590a4f02300c02c52b Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Aug 31 16:50:17 2021 +0100 libstdc++: Add missing return for atomic timed wait [PR102074] This adds a missing return statement to the non-futex wait-until operation. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/102074 * include/bits/atomic_timed_wait.h (__timed_waiter_pool) [!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/102074] include/bits/atomic_timed_wait.h:215: possible missing return ? 2021-08-26 9:19 [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? dcb314 at hotmail dot com ` (2 preceding siblings ...) 2021-08-31 16:46 ` cvs-commit at gcc dot gnu.org @ 2021-10-12 10:58 ` cvs-commit at gcc dot gnu.org 2022-01-16 1:16 ` rodgertq at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-10-12 10:58 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102074 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:aeee9251c64fe59c3e548e843f08bbda302cb08b commit r11-9106-gaeee9251c64fe59c3e548e843f08bbda302cb08b Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Aug 31 16:50:17 2021 +0100 libstdc++: Add missing return for atomic timed wait [PR102074] This adds a missing return statement to the non-futex wait-until operation. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/102074 * include/bits/atomic_timed_wait.h (__timed_waiter_pool) [!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return. (cherry picked from commit 763eb1f19239ebb19c0f87590a4f02300c02c52b) ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/102074] include/bits/atomic_timed_wait.h:215: possible missing return ? 2021-08-26 9:19 [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? dcb314 at hotmail dot com ` (3 preceding siblings ...) 2021-10-12 10:58 ` cvs-commit at gcc dot gnu.org @ 2022-01-16 1:16 ` rodgertq at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: rodgertq at gcc dot gnu.org @ 2022-01-16 1:16 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102074 Thomas Rodgers <rodgertq at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #4 from Thomas Rodgers <rodgertq at gcc dot gnu.org> --- Fixed on master, see - https://gcc.gnu.org/g:763eb1f19239ebb19c0f87590a4f02300c02c52b ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-16 1:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-08-26 9:19 [Bug libstdc++/102074] New: include/bits/atomic_timed_wait.h:215: possible missing return ? dcb314 at hotmail dot com 2021-08-26 12:16 ` [Bug libstdc++/102074] " redi at gcc dot gnu.org 2021-08-28 10:19 ` redi at gcc dot gnu.org 2021-08-31 16:46 ` cvs-commit at gcc dot gnu.org 2021-10-12 10:58 ` cvs-commit at gcc dot gnu.org 2022-01-16 1:16 ` rodgertq at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).