[Core] scan-build: switch_cache_db_type_name(). Value stored to 'type_str' during its initialization is never read (#3273)

This commit is contained in:
Andrey Volk authored and GitHub committed 2026-11-09 20:17:18 +03:00
1 parent 209e98e9af
commit 6383a78dd2
1 file changed
+5 -16
+5 -16
View File
@@ -2625,27 +2625,16 @@ typedef struct switch_cache_db_handle switch_cache_db_handle_t;
static inline const char *switch_cache_db_type_name(switch_cache_db_handle_type_t type)
{
const char *type_str = "INVALID";
switch (type) {
case SCDB_TYPE_DATABASE_INTERFACE:
{
type_str = "DATABASE_INTERFACE";
}
break;
return "DATABASE_INTERFACE";
case SCDB_TYPE_ODBC:
{
type_str = "ODBC";
}
break;
return "ODBC";
case SCDB_TYPE_CORE_DB:
{
type_str = "CORE_DB";
}
break;
return "CORE_DB";
default:
return "INVALID";
}
return type_str;
}
SWITCH_DECLARE(switch_cache_db_handle_type_t) switch_cache_db_get_type(switch_cache_db_handle_t *dbh);