Skip to content

Commit

Permalink
A smattering of -Wmissing-field-initializers fixes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Alexey Spiridonov authored and facebook-github-bot committed Feb 22, 2025
1 parent 2885c51 commit 25e0194
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prelude/python/tools/static_extension_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static PyMethodDef StaticExtensionLoaderType_methods[] = {
(PyCFunction)(void (*)(void))_get_source,
METH_STATIC | METH_O,
nullptr},
{nullptr, nullptr}};
{}};

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

static PyModuleDef_Slot _static_extension_utils_slots[] = {
{Py_mod_exec, (void*)_static_extension_utils_exec},
{0, nullptr}};
{}};

static PyMethodDef _static_extension_utils_methods[] = {
{"_check_module", _check_module, METH_O, _check_module_doc},
{nullptr, nullptr}};
{}};

PyDoc_STRVAR(
module_doc,
Expand Down

0 comments on commit 25e0194

Please sign in to comment.