1
0
mirror of https://github.com/google/cpu_features.git synced 2025-06-30 21:02:34 +02:00

fix: Return default value from ‘GetCacheTypeString’ (#162)

The build fails with following message when -Werror
and -Werror=return-type are enabled.

In function ‘GetCacheTypeString’:
	error: control reaches end of non-void function [-Werror=return-type]

Simple fix is to return explicitly communicate to
the compiler that certain block is not reachable.
This commit is contained in:
Kris Kwiatkowski
2021-06-25 09:28:26 +01:00
committed by GitHub
parent 646b80fa3a
commit 001faefdc3
2 changed files with 14 additions and 0 deletions

View File

@ -340,6 +340,7 @@ static Node* GetCacheTypeString(CacheType cache_type) {
case CPU_FEATURE_CACHE_PREFETCH:
return CreateConstantString("prefetch");
}
UNREACHABLE();
}
static void AddCacheInfo(Node* root, const CacheInfo* cache_info) {