loader: Silence Wmissing-field-initializers warnings (#499)

Specifying 0 as the initial entry of a structure is a C-ism. C++ permits
using an empty set of braces to signify the same behavior, silencing
missing initializer warnings.
This commit is contained in:
Mat M
2019-04-05 00:05:41 -04:00
committed by SciresM
parent 753958de28
commit b237168ec7
11 changed files with 26 additions and 25 deletions

View File

@@ -107,7 +107,7 @@ Result NsoUtils::LoadNsoHeaders(u64 title_id) {
/* Zero out the cache. */
std::fill(g_nso_present, g_nso_present + NSO_NUM_MAX, false);
std::fill(g_nso_headers, g_nso_headers + NSO_NUM_MAX, (const NsoUtils::NsoHeader &){0});
std::fill(g_nso_headers, g_nso_headers + NSO_NUM_MAX, NsoUtils::NsoHeader{});
for (unsigned int i = 0; i < NSO_NUM_MAX; i++) {
f_nso = OpenNso(i, title_id);
@@ -161,7 +161,8 @@ Result NsoUtils::ValidateNsoLoadSet() {
Result NsoUtils::CalculateNsoLoadExtents(u32 addspace_type, u32 args_size, NsoLoadExtents *extents) {
*extents = (const NsoUtils::NsoLoadExtents){0};
*extents = {};
/* Calculate base offsets. */
for (unsigned int i = 0; i < NSO_NUM_MAX; i++) {
if (g_nso_present[i]) {