Skip to content

Commit

Permalink
Merge pull request #1260 from bioinfornatics/master
Browse files Browse the repository at this point in the history
Fixing warning highlight by -Wswitch flag
  • Loading branch information
WalterBright committed Nov 9, 2012
2 parents 0d432ac + 74ac0bb commit a14580e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/builtin.c
Expand Up @@ -218,6 +218,7 @@ Expression *eval_builtin(Loc loc, enum BUILTIN builtin, Expressions *arguments)
if (arg0->op == TOKint64)
e = new IntegerExp(loc, eval_bswap(arg0), arg0->type);
break;
default: break;
}
return e;
}
Expand Down
1 change: 1 addition & 0 deletions src/expression.c
Expand Up @@ -6735,6 +6735,7 @@ Expression *DotIdExp::semantic(Scope *sc, int flag)
case TOKimport: ds = ((ScopeExp *)e1)->sds; goto L1;
case TOKvar: ds = ((VarExp *)e1)->var; goto L1;
case TOKdotvar: ds = ((DotVarExp *)e1)->var; goto L1;
default: break;
L1:
char* s = ds->mangle();
e = new StringExp(loc, s, strlen(s), 'c');
Expand Down
1 change: 1 addition & 0 deletions src/lexer.c
Expand Up @@ -2419,6 +2419,7 @@ __body
case TOKfloat80v:
result = TOKimaginary80v;
break;
default: break;
}
}
#if _WIN32 && __DMC__
Expand Down
3 changes: 3 additions & 0 deletions src/mtype.c
Expand Up @@ -5274,6 +5274,7 @@ void TypeFunction::toDecoBuffer(OutBuffer *buf, int flag)
case TRUSTsafe:
buf->writestring("Nf");
break;
default: break;
}
}
// Write argument types
Expand Down Expand Up @@ -5329,6 +5330,7 @@ void TypeFunction::toCBufferWithAttributes(OutBuffer *buf, Identifier *ident, Hd
case TRUSTsafe:
buf->writestring("@safe ");
break;
default: break;
}

if (hgs->ddoc != 1)
Expand Down Expand Up @@ -5458,6 +5460,7 @@ void TypeFunction::attributesToCBuffer(OutBuffer *buf, int mod)
case TRUSTsafe:
buf->writestring(" @safe");
break;
default: break;
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/parse.c
Expand Up @@ -519,6 +519,7 @@ Dsymbols *Parser::parseDeclDefs(int once)
case TOKexport:
error("redundant protection attribute");
break;
default: break;
}
a = parseBlock();
s = new ProtDeclaration(prot, a);
Expand Down Expand Up @@ -1734,6 +1735,7 @@ BaseClasses *Parser::parseBaseClasses()
protection = PROTpublic;
nextToken();
break;
default: break;
}
if (prot)
deprecation("use of base class protection is deprecated");
Expand Down Expand Up @@ -2718,6 +2720,7 @@ Type *Parser::parseDeclarator(Type *t, Identifier **pident, TemplateParameters *
*pt = tf;
break;
}
default: break;
}
break;
}
Expand Down Expand Up @@ -2837,6 +2840,7 @@ Dsymbols *Parser::parseDeclarations(StorageClass storage_class, unsigned char *c
tok = token.value;
nextToken();
break;
default: break;
}

storage_class = STCundefined;
Expand Down Expand Up @@ -4874,6 +4878,7 @@ int Parser::isDeclarator(Token **pt, int *haveId, enum TOK endtok)
return FALSE;
skipAttributes(t, &t);
continue;
default: break;
}
break;
}
Expand Down

0 comments on commit a14580e

Please sign in to comment.