public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: Fix missing breaks in switch statement Date: Wed, 5 Aug 2020 20:42:56 +0000 (GMT) [thread overview] Message-ID: <20200805204256.5D749385701E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5898a044c32cf67a1fdc90c8ba48c166d2b11909 commit 5898a044c32cf67a1fdc90c8ba48c166d2b11909 Author: Corinna Vinschen <corinna@vinschen.de> Date: Wed Aug 5 21:46:53 2020 +0200 Cygwin: Fix missing breaks in switch statement Two switch statements in sysconf() and fhandler_fifo::take_ownership were missing breaks. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/fhandler_fifo.cc | 2 ++ winsup/cygwin/sysconf.cc | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index a33c32b73..b3c4c4a25 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1296,9 +1296,11 @@ fhandler_fifo::take_ownership (DWORD timeout) case WAIT_TIMEOUT: debug_printf ("timed out"); ret = -1; + break; default: debug_printf ("WFSO failed, %E"); ret = -1; + break; } return ret; } diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index 3440c09ee..001da96ad 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -341,9 +341,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL1_ICACHE_ASSOC: if (cur_level == 1 && cache_type == 2) return assoc; + break; case _SC_LEVEL1_ICACHE_LINESIZE: if (cur_level == 1 && cache_type == 2) return linesize; + break; case _SC_LEVEL1_DCACHE_SIZE: if (cur_level == 1 && cache_type == 1) ret += assoc * part * linesize * sets; @@ -351,9 +353,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL1_DCACHE_ASSOC: if (cur_level == 1 && cache_type == 1) return assoc; + break; case _SC_LEVEL1_DCACHE_LINESIZE: if (cur_level == 1 && cache_type == 1) return linesize; + break; case _SC_LEVEL2_CACHE_SIZE: if (cur_level == 2) ret += assoc * part * linesize * sets; @@ -361,9 +365,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL2_CACHE_ASSOC: if (cur_level == 2) return assoc; + break; case _SC_LEVEL2_CACHE_LINESIZE: if (cur_level == 2) return linesize; + break; case _SC_LEVEL3_CACHE_SIZE: if (cur_level == 3) ret += assoc * part * linesize * sets; @@ -371,9 +377,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL3_CACHE_ASSOC: if (cur_level == 3) return assoc; + break; case _SC_LEVEL3_CACHE_LINESIZE: if (cur_level == 3) return linesize; + break; } } return ret;
reply other threads:[~2020-08-05 20:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200805204256.5D749385701E@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).