Remove default labels from fully covered switch statements.
Allow compilers to warn when new enum values are added, making switches no-longer fully-covered.
This commit is contained in:
parent
5376151aa1
commit
ff710539ab
|
@ -217,8 +217,6 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method,
|
||||||
url += "?" + fields;
|
url += "?" + fields;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||||
|
|
|
@ -2283,7 +2283,6 @@ bool cmLocalGenerator::GetShouldUseOldFlags(bool shared,
|
||||||
case cmPolicies::REQUIRED_IF_USED:
|
case cmPolicies::REQUIRED_IF_USED:
|
||||||
case cmPolicies::REQUIRED_ALWAYS:
|
case cmPolicies::REQUIRED_ALWAYS:
|
||||||
case cmPolicies::NEW:
|
case cmPolicies::NEW:
|
||||||
default:
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3365,7 +3365,6 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
|
||||||
case cmPolicies::REQUIRED_IF_USED:
|
case cmPolicies::REQUIRED_IF_USED:
|
||||||
case cmPolicies::REQUIRED_ALWAYS:
|
case cmPolicies::REQUIRED_ALWAYS:
|
||||||
case cmPolicies::NEW:
|
case cmPolicies::NEW:
|
||||||
default:
|
|
||||||
result = moduleInCMakeRoot;
|
result = moduleInCMakeRoot;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,6 @@ const std::string cmNewLineStyle::GetCharacters() const
|
||||||
return "\n";
|
return "\n";
|
||||||
case CRLF:
|
case CRLF:
|
||||||
return "\r\n";
|
return "\r\n";
|
||||||
default:
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,6 @@ bool cmTargetLinkLibrariesCommand
|
||||||
GetRequiredPolicyError(cmPolicies::CMP0016);
|
GetRequiredPolicyError(cmPolicies::CMP0016);
|
||||||
break;
|
break;
|
||||||
case cmPolicies::NEW: // NEW behavior prints the error.
|
case cmPolicies::NEW: // NEW behavior prints the error.
|
||||||
default:
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue