Changeset 243311 in webkit
- Timestamp:
- Mar 21, 2019, 12:09:10 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
runtime/IntlDateTimeFormat.cpp (modified) (1 diff)
-
runtime/IntlNumberFormat.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r243299 r243311 1 2019-03-21 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Fix JSC build with newer ICU 4 https://bugs.webkit.org/show_bug.cgi?id=196098 5 6 Reviewed by Keith Miller. 7 8 IntlDateTimeFormat and IntlNumberFormat have switch statement over ICU's enums. However it lacks "default" clause so that 9 the compile error occurs when a new enum value is added in ICU side. We should have "default" clause which just fallbacks 10 "unknown"_s case. The behavior is not changed since we already have `return "unknown"_s;` statement anyway after the 11 switch statement. This patch just suppresses a compile error. 12 13 * runtime/IntlDateTimeFormat.cpp: 14 (JSC::IntlDateTimeFormat::partTypeString): 15 * runtime/IntlNumberFormat.cpp: 16 (JSC::IntlNumberFormat::partTypeString): 17 1 18 2019-03-21 Tadeu Zagallo <tzagallo@apple.com> 2 19 -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
r240557 r243311 978 978 case UDAT_FIELD_COUNT: 979 979 #endif 980 // Any newer additions to the UDateFormatField enum should just be considered an "unknown" part. 981 default: 980 982 return "unknown"_s; 981 983 } 982 // Any newer additions to the UDateFormatField enum should just be considered an "unknown" part.983 984 return "unknown"_s; 984 985 } -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
r240992 r243311 477 477 case UNUM_FIELD_COUNT: 478 478 #endif 479 // Any newer additions to the UNumberFormatFields enum should just be considered an "unknown" part. 480 default: 479 481 return "unknown"_s; 480 482 } 481 // Any newer additions to the UNumberFormatFields enum should just be considered an "unknown" part.482 483 return "unknown"_s; 483 484 }
Note:
See TracChangeset
for help on using the changeset viewer.