[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] [PATCH 3/3] Fix compiler warning, switch statement need
From: |
Stefan Brüns |
Subject: |
[Simulavr-devel] [PATCH 3/3] Fix compiler warning, switch statement needs default case |
Date: |
Sun, 19 Jan 2014 18:14:13 +0100 |
User-agent: |
KMail/4.11.3 (Linux/3.11.6-4-desktop; KDE/4.11.3; x86_64; ; ) |
dState might have a value not handled in the switch statement, in this
case there is no return statement.
Signed-off-by: Stefan Brüns <address@hidden>
---
src/pin.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pin.cpp b/src/pin.cpp
index 39a1144..6c53b6a 100644
--- a/src/pin.cpp
+++ b/src/pin.cpp
@@ -43,6 +43,10 @@ float AnalogValue::getA(float vcc) {
if(aValue > vcc)
return vcc;
return aValue;
+
+ default: // not reached
+ return 0.0;
+
}
}
--
1.8.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Simulavr-devel] [PATCH 3/3] Fix compiler warning, switch statement needs default case,
Stefan Brüns <=