Merge pull request #10255 from akallabeth/cov_warn_fix
[proxy,modules] replace global constructor
This commit is contained in:
commit
223fca31da
2
.github/workflows/clang-tidy-post.yml
vendored
2
.github/workflows/clang-tidy-post.yml
vendored
@ -20,5 +20,5 @@ jobs:
|
||||
# lgtm_comment_body, max_comments, and annotations need to be set on the posting workflow in a split setup
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
annotations: true
|
||||
annotations: false
|
||||
max_comments: 10
|
||||
|
@ -100,7 +100,7 @@ static BOOL treatReadResult(WINPR_BIO_NAMED* ptr, DWORD readBytes)
|
||||
|
||||
static BOOL doReadOp(WINPR_BIO_NAMED* ptr)
|
||||
{
|
||||
DWORD readBytes;
|
||||
DWORD readBytes = 0;
|
||||
|
||||
if (!ResetEvent(ptr->readEvent))
|
||||
return FALSE;
|
||||
@ -162,7 +162,7 @@ static int transport_bio_named_read(BIO* bio, char* buf, int size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
DWORD readBytes;
|
||||
DWORD readBytes = 0;
|
||||
if (!GetOverlappedResult(ptr->hFile, &ptr->readOverlapped, &readBytes, FALSE))
|
||||
{
|
||||
WLog_ERR(TAG, "GetOverlappedResult blocking(lastError=%" PRIu32 ")",
|
||||
@ -195,7 +195,7 @@ static int transport_bio_named_read(BIO* bio, char* buf, int size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
DWORD readBytes;
|
||||
DWORD readBytes = 0;
|
||||
if (!GetOverlappedResult(ptr->hFile, &ptr->readOverlapped, &readBytes, FALSE))
|
||||
{
|
||||
WLog_ERR(TAG, "GetOverlappedResult non blocking(lastError=%" PRIu32 ")",
|
||||
|
@ -42,8 +42,21 @@ static constexpr char plugin_name[] = "bitmap-filter";
|
||||
static constexpr char plugin_desc[] =
|
||||
"this plugin deactivates and filters persistent bitmap cache.";
|
||||
|
||||
static const std::vector<std::string> plugin_static_intercept = { DRDYNVC_SVC_CHANNEL_NAME };
|
||||
static const std::vector<std::string> plugin_dyn_intercept = { RDPGFX_DVC_CHANNEL_NAME };
|
||||
static const std::vector<std::string>& plugin_static_intercept()
|
||||
{
|
||||
static std::vector<std::string> vec;
|
||||
if (vec.empty())
|
||||
vec.push_back(DRDYNVC_SVC_CHANNEL_NAME);
|
||||
return vec;
|
||||
}
|
||||
|
||||
static const std::vector<std::string>& plugin_dyn_intercept()
|
||||
{
|
||||
static std::vector<std::string> vec;
|
||||
if (vec.empty())
|
||||
vec.push_back(RDPGFX_DVC_CHANNEL_NAME);
|
||||
return vec;
|
||||
}
|
||||
|
||||
class DynChannelState
|
||||
{
|
||||
@ -126,8 +139,8 @@ static BOOL filter_dyn_channel_intercept_list(proxyPlugin* plugin, proxyData* pd
|
||||
WINPR_ASSERT(pdata);
|
||||
WINPR_ASSERT(data);
|
||||
|
||||
auto intercept = std::find(plugin_dyn_intercept.begin(), plugin_dyn_intercept.end(),
|
||||
data->name) != plugin_dyn_intercept.end();
|
||||
auto intercept = std::find(plugin_dyn_intercept().begin(), plugin_dyn_intercept().end(),
|
||||
data->name) != plugin_dyn_intercept().end();
|
||||
if (intercept)
|
||||
data->intercept = TRUE;
|
||||
return TRUE;
|
||||
@ -141,8 +154,8 @@ static BOOL filter_static_channel_intercept_list(proxyPlugin* plugin, proxyData*
|
||||
WINPR_ASSERT(pdata);
|
||||
WINPR_ASSERT(data);
|
||||
|
||||
auto intercept = std::find(plugin_static_intercept.begin(), plugin_static_intercept.end(),
|
||||
data->name) != plugin_static_intercept.end();
|
||||
auto intercept = std::find(plugin_static_intercept().begin(), plugin_static_intercept().end(),
|
||||
data->name) != plugin_static_intercept().end();
|
||||
if (intercept)
|
||||
data->intercept = TRUE;
|
||||
return TRUE;
|
||||
|
@ -55,7 +55,13 @@ static constexpr char plugin_name[] = "dyn-channel-dump";
|
||||
static constexpr char plugin_desc[] =
|
||||
"This plugin dumps configurable dynamic channel data to a file.";
|
||||
|
||||
static const std::vector<std::string> plugin_static_intercept = { DRDYNVC_SVC_CHANNEL_NAME };
|
||||
static const std::vector<std::string>& plugin_static_intercept()
|
||||
{
|
||||
static std::vector<std::string> vec;
|
||||
if (vec.empty())
|
||||
vec.push_back(DRDYNVC_SVC_CHANNEL_NAME);
|
||||
return vec;
|
||||
}
|
||||
|
||||
static constexpr char key_path[] = "path";
|
||||
static constexpr char key_channels[] = "channels";
|
||||
@ -286,8 +292,8 @@ static BOOL dump_static_channel_intercept_list(proxyPlugin* plugin, proxyData* p
|
||||
WINPR_ASSERT(pdata);
|
||||
WINPR_ASSERT(data);
|
||||
|
||||
auto intercept = std::find(plugin_static_intercept.begin(), plugin_static_intercept.end(),
|
||||
data->name) != plugin_static_intercept.end();
|
||||
auto intercept = std::find(plugin_static_intercept().begin(), plugin_static_intercept().end(),
|
||||
data->name) != plugin_static_intercept().end();
|
||||
if (intercept)
|
||||
{
|
||||
WLog_INFO(TAG, "intercepting channel '%s'", data->name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user