Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 2558763

Browse files
kkoopaxzyfer
authored andcommittedMar 17, 2018
Silence g++7 switch case fallthrough warnings
1 parent 968020e commit 2558763

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎src/sass_types/color.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace SassTypes
2828
}
2929

3030
a = Nan::To<double>(raw_val[3]).FromJust();
31-
// fall through vvv
31+
NODE_SASS_FALLTHROUGH;
3232

3333
case 3:
3434
if (!raw_val[0]->IsNumber() || !raw_val[1]->IsNumber() || !raw_val[2]->IsNumber()) {

‎src/sass_types/color.h

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#include <nan.h>
55
#include "sass_value_wrapper.h"
66

7+
#if defined(__GNUC__) && __GNUC__ >= 7
8+
#define NODE_SASS_FALLTHROUGH __attribute__ ((fallthrough))
9+
#else
10+
#define NODE_SASS_FALLTHROUGH
11+
#endif
12+
713
namespace SassTypes
814
{
915
class Color : public SassValueWrapper<Color> {

0 commit comments

Comments
 (0)
This repository has been archived.