Fix most clang warnings

- member initializing order in some constructors
- missing default branches in switch-case
- uninitialized variable if switch-case default (uncritical because
  program would exit)
- && and || brace warnings in if()
This commit is contained in:
Andre Weissflog 2015-07-11 14:45:57 +02:00
parent e6f7988ade
commit a5ade51363
6 changed files with 9 additions and 7 deletions

View file

@ -1175,7 +1175,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool proj, co
Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters)
{
// Figure out the result type
Id resultType;
Id resultType = NoType;
switch (opCode) {
case OpTextureQuerySize:
case OpTextureQuerySizeLod:

View file

@ -213,10 +213,10 @@ public:
class InstructionParameters {
public:
InstructionParameters() :
typePresent(true), // most normal, only exceptions have to be spelled out
resultPresent(true), // most normal, only exceptions have to be spelled out
opDesc(0),
opClass(OpClassMisc)
opClass(OpClassMisc),
typePresent(true), // most normal, only exceptions have to be spelled out
resultPresent(true) // most normal, only exceptions have to be spelled out
{ }
void setResultAndType(bool r, bool t)