Skip to content

Commit

Permalink
Merge pull request #2547 from mgreter/bugfix/compiler-warnings
Browse files Browse the repository at this point in the history
Fix some compiler warnings
  • Loading branch information
mgreter authored Jan 22, 2018
2 parents f995957 + f6e29e3 commit 6c10b38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/cencode.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
result = (fragment & 0x0fc) >> 2;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x003) << 4;
#ifndef _MSC_VER
__attribute__ ((fallthrough));
#endif
case step_B:
if (plainchar == plaintextend)
{
Expand All @@ -57,6 +60,9 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
result |= (fragment & 0x0f0) >> 4;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x00f) << 2;
#ifndef _MSC_VER
__attribute__ ((fallthrough));
#endif
case step_C:
if (plainchar == plaintextend)
{
Expand Down
2 changes: 2 additions & 0 deletions src/debugger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,8 @@ inline void debug_ast(AST_Node_Ptr node, std::string ind, Env* env)
case Expression::Concrete_Type::C_ERROR: std::cerr << " [C_ERROR]"; break;
case Expression::Concrete_Type::FUNCTION: std::cerr << " [FUNCTION]"; break;
case Expression::Concrete_Type::NUM_TYPES: std::cerr << " [NUM_TYPES]"; break;
case Expression::Concrete_Type::VARIABLE: std::cerr << " [VARIABLE]"; break;
case Expression::Concrete_Type::FUNCTION_VAL: std::cerr << " [FUNCTION_VAL]"; break;
}
std::cerr << std::endl;
} else if (Cast<Has_Block>(node)) {
Expand Down
2 changes: 1 addition & 1 deletion src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ namespace Sass {
re_selector_list
>(p)
) {
bool could_be_property = peek< sequence< exactly<'-'>, exactly<'-'> > >(p);
bool could_be_property = peek< sequence< exactly<'-'>, exactly<'-'> > >(p) != 0;
while (p < q) {
// did we have interpolations?
if (*p == '#' && *(p+1) == '{') {
Expand Down

0 comments on commit 6c10b38

Please sign in to comment.