Skip to content

Commit

Permalink
Use C++17 [[fallthrough]] in 1 file inc ../xplat/hermes/external/dtoa…
Browse files Browse the repository at this point in the history
…/dtoa.inc

Reviewed By: dmm-fb

Differential Revision: D58818992

fbshipit-source-id: 53ba3f0491163cfbf2c6d7b2774ed0a16640b67f
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jun 24, 2024
1 parent 7f8e512 commit 3153f50
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions external/dtoa/dtoa.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
* calculation.
*/

#if defined __has_attribute
#if __has_attribute(fallthrough)
#define FALLTHROUGH __attribute__ ((fallthrough))
#else
#define FALLTHROUGH (void)0
#endif
#else
#define FALLTHROUGH (void)0
#endif


char *
g_dtoa
#ifdef KR_headers
Expand Down Expand Up @@ -274,15 +285,15 @@ g_dtoa
break;
case 2:
leftright = 0;
/* no break */
FALLTHROUGH;
case 4:
if (ndigits <= 0)
ndigits = 1;
ilim = ilim1 = i = ndigits;
break;
case 3:
leftright = 0;
/* no break */
FALLTHROUGH;
case 5:
i = ndigits + k + 1;
ilim = i;
Expand Down

0 comments on commit 3153f50

Please sign in to comment.