You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bvar/detail/series.h:131:23: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct bvar::Stat'; use assignment or value-initialization instead [-Wclass-memaccess]
......
include/bvar/detail/percentile.h:240:7: note: 'class bvar::detail::PercentileSamples<254>' declared here
240 | class PercentileSamples {
| ^~~~~~~~~~~~~~~~~
include/bvar/recorder.h:33:8: note: 'struct bvar::Stat' declared here
33 | struct Stat {
warning太多了,还不太想屏蔽这个warning,请问有patch能修复这个吗
这是我的修改方式,能规避这个warning,但是效率会低一些,有没有官方的patch ?
bvar/detail/series.h line 131
if (butil::is_integral<T>::value ||
butil::is_floating_point<T>::value) {
//memset(_array, 0, sizeof(_array));for(int i = 0;i < sizeof(_array)/sizeof(T);++i) {
new(&_array[i])T();
}
}
brpc-0.9.7
warning太多了,还不太想屏蔽这个warning,请问有patch能修复这个吗
这是我的修改方式,能规避这个warning,但是效率会低一些,有没有官方的patch ?
bvar/detail/series.h line 131
我看了下rapidjson对于这一类的解决方案是static_cast成 void*
Tencent/rapidjson#1323 官方有考虑做类似的修改吗
The text was updated successfully, but these errors were encountered: