gecko-dev/netwerk
Valentin Gosu d1513f313e Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-09 10:20:04 +00:00
..
base Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
build Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw 2021-06-04 12:35:16 +00:00
cache Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
cache2 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
cookie Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
dns Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
docs Bug 1706916 - Land some in-tree docs for TRR r=nhnt11 2021-04-26 10:47:54 +00:00
ipc Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
locales Bug 1708125 - Remove some remaining FTP references from the tree r=necko-reviewers,dragana,Gijs 2021-05-31 13:08:12 +00:00
mime Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw 2021-06-04 12:35:16 +00:00
protocol Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
sctp Bug 1709617 - Don't generate socket() in content process for getting MTU r=jesup 2021-05-11 18:08:18 +00:00
socket Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
streamconv Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
system Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
test Bug 1715300 - Enable BFCache in parent. r=smaug 2021-06-09 06:12:31 +00:00
url-classifier Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
wifi Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw 2021-06-09 10:20:04 +00:00
moz.build Bug 1696393 - Add in-tree HTTP cache docs r=necko-reviewers,sylvestre,dragana DONTBUILD 2021-03-08 10:28:11 +00:00