public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: Fix missing breaks in switch statement
@ 2020-08-05 20:42 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2020-08-05 20:42 UTC (permalink / raw)
To: cygwin-cvs
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-05 20:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 20:42 [newlib-cygwin] Cygwin: Fix missing breaks in switch statement Corinna Vinschen
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).