Skip to content

Commit 25e0194

Browse files
snarkmasterfacebook-github-bot
authored andcommitted
A smattering of -Wmissing-field-initializers fixes
Summary: r-barnes has a long-standing project to enable this globally, and I agree with it. This is my quick attempt to help. Per r-barnes's P1737775585, the top offender seems to be `static_extension_utils.cpp`, tested via: ``` buck2 build --config cxx.extra_cxxflags=-Wmissing-field-initializers \ @//mode/opt fbcode//tools/xar/facebook:make_xar ``` The next worst offender was `GlobalComputedDataProvider.cpp`: ``` buck2 build --config cxx.extra_cxxflags=-Wmissing-field-initializers \ fbcode//rim/policies:global_computed_data_provider ``` I also fixed a bunch of other stuff, roughly covered: ``` buck2 build --config cxx.extra_cxxflags=-Wmissing-field-initializers \ fbcode//cacheclient/tao/impl:config_caches \ fbcode//warm_storage/client/prod/common:context_with_cat_util \ fbcode//everstore/client/cpp/dev:everstore_client_impl \ fbcode//warm_storage/common/client/prod:context_util \ fbcode//smc/smcproxy:SmcProxyConfig \ fbcode//fbpkg/utils:fbpkg_acl_creation \ fbcode//sally/env:mem_buffer ``` Reviewed By: dtolnay Differential Revision: D70008646 fbshipit-source-id: ae56272a1c7e6297064b4c9acbe8fdc7029fca88
1 parent 2885c51 commit 25e0194

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prelude/python/tools/static_extension_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static PyMethodDef StaticExtensionLoaderType_methods[] = {
157157
(PyCFunction)(void (*)(void))_get_source,
158158
METH_STATIC | METH_O,
159159
nullptr},
160-
{nullptr, nullptr}};
160+
{}};
161161

162162
static PyType_Slot StaticExtensionLoader_slots[] = {
163163
{Py_tp_doc, (void*)StaticExtensionLoader_doc},
@@ -204,11 +204,11 @@ static PyObject* _check_module(PyObject* self, PyObject* fullname) {
204204

205205
static PyModuleDef_Slot _static_extension_utils_slots[] = {
206206
{Py_mod_exec, (void*)_static_extension_utils_exec},
207-
{0, nullptr}};
207+
{}};
208208

209209
static PyMethodDef _static_extension_utils_methods[] = {
210210
{"_check_module", _check_module, METH_O, _check_module_doc},
211-
{nullptr, nullptr}};
211+
{}};
212212

213213
PyDoc_STRVAR(
214214
module_doc,

0 commit comments

Comments
 (0)