Skip to content

Commit 6c10b38

Browse files
authored
Merge pull request #2547 from mgreter/bugfix/compiler-warnings
Fix some compiler warnings
2 parents f995957 + f6e29e3 commit 6c10b38

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/cencode.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
4646
result = (fragment & 0x0fc) >> 2;
4747
*codechar++ = base64_encode_value(result);
4848
result = (fragment & 0x003) << 4;
49+
#ifndef _MSC_VER
50+
__attribute__ ((fallthrough));
51+
#endif
4952
case step_B:
5053
if (plainchar == plaintextend)
5154
{
@@ -57,6 +60,9 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
5760
result |= (fragment & 0x0f0) >> 4;
5861
*codechar++ = base64_encode_value(result);
5962
result = (fragment & 0x00f) << 2;
63+
#ifndef _MSC_VER
64+
__attribute__ ((fallthrough));
65+
#endif
6066
case step_C:
6167
if (plainchar == plaintextend)
6268
{

src/debugger.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,8 @@ inline void debug_ast(AST_Node_Ptr node, std::string ind, Env* env)
696696
case Expression::Concrete_Type::C_ERROR: std::cerr << " [C_ERROR]"; break;
697697
case Expression::Concrete_Type::FUNCTION: std::cerr << " [FUNCTION]"; break;
698698
case Expression::Concrete_Type::NUM_TYPES: std::cerr << " [NUM_TYPES]"; break;
699+
case Expression::Concrete_Type::VARIABLE: std::cerr << " [VARIABLE]"; break;
700+
case Expression::Concrete_Type::FUNCTION_VAL: std::cerr << " [FUNCTION_VAL]"; break;
699701
}
700702
std::cerr << std::endl;
701703
} else if (Cast<Has_Block>(node)) {

src/parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ namespace Sass {
27692769
re_selector_list
27702770
>(p)
27712771
) {
2772-
bool could_be_property = peek< sequence< exactly<'-'>, exactly<'-'> > >(p);
2772+
bool could_be_property = peek< sequence< exactly<'-'>, exactly<'-'> > >(p) != 0;
27732773
while (p < q) {
27742774
// did we have interpolations?
27752775
if (*p == '#' && *(p+1) == '{') {

0 commit comments

Comments
 (0)