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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user