Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: webrtc/api/mediatypes.cc

Issue 2726633004: Fixing "control reaches end of non-void function" compile warning. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/mediatypes.cc
diff --git a/webrtc/api/mediatypes.cc b/webrtc/api/mediatypes.cc
index fbcb53d85b272a6db147df56c4d0a8c70ed96976..2e3538dad825ce722c39bcc742456a4d00ca9727 100644
--- a/webrtc/api/mediatypes.cc
+++ b/webrtc/api/mediatypes.cc
@@ -28,8 +28,9 @@ std::string MediaTypeToString(MediaType type) {
case MEDIA_TYPE_DATA:
return kMediaTypeData;
}
- // Not reachable; avoids compile warning.
FATAL();
+ // Not reachable; avoids compile warning.
+ return "";
}
MediaType MediaTypeFromString(const std::string& type_str) {
@@ -39,9 +40,10 @@ MediaType MediaTypeFromString(const std::string& type_str) {
return MEDIA_TYPE_VIDEO;
} else if (type_str == kMediaTypeData) {
return MEDIA_TYPE_DATA;
- } else {
- FATAL();
}
+ FATAL();
+ // Not reachable; avoids compile warning.
+ return static_cast<MediaType>(-1);
}
} // namespace cricket
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698