Skip to content

Commit

Permalink
build: resolve 4 instances of -Wbraced-scalar-init
Browse files Browse the repository at this point in the history
tools/mbop_main.cpp:294:64: warning: braces around scalar initializer [-Wbraced-scalar-init]
  294 |         static constexpr PROPTAG_ARRAY ftaghdr[] = {std::size(ftags), {deconst(ftags)}};
  • Loading branch information
fcneuf committed Dec 29, 2023
1 parent 572e100 commit 6725a62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/mbop_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static int do_hierarchy(eid_t fid)
return EXIT_FAILURE;
}
static constexpr uint32_t ftags[] = {PidTagFolderId};
static constexpr PROPTAG_ARRAY ftaghdr[] = {std::size(ftags), deconst(ftags)};
static constexpr PROPTAG_ARRAY ftaghdr[] = {std::size(ftags), {deconst(ftags)}};
tarray_set rowset{};
if (!exmdb_client::query_table(g_storedir, nullptr, CP_ACP, table_id,
ftaghdr, 0, row_count, &rowset)) {
Expand Down Expand Up @@ -538,7 +538,7 @@ static errno_t clear_rwz()
}

static constexpr uint32_t qtags1[] = {PidTagMid};
static constexpr PROPTAG_ARRAY qtags[] = {std::size(qtags1), deconst(qtags1)};
static constexpr PROPTAG_ARRAY qtags[] = {std::size(qtags1), {deconst(qtags1)}};
TARRAY_SET rowset{};
if (!exmdb_client::query_table(g_storedir, nullptr, CP_ACP, table_id,
qtags, 0, rowcount, &rowset))
Expand Down
4 changes: 2 additions & 2 deletions tools/oxm2mt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static int ptemv_to_prop(const struct pte &pte, const char *cset,
return -EIO;
}
if (unitsize != 0) {
GEN_ARRAY mv{pte.v_ui4 / unitsize, blob->pv};
GEN_ARRAY mv{pte.v_ui4 / unitsize, {blob->pv}};
return proplist.set(pte.proptag, &mv);
}
if (pte.v_ui4 != blob->cb)
Expand All @@ -225,7 +225,7 @@ static int ptemv_to_prop(const struct pte &pte, const char *cset,
}
bvec[i] = *bdata[i];
}
GEN_ARRAY mv{static_cast<uint32_t>(bvec.size()), bvec.data()};
GEN_ARRAY mv{static_cast<uint32_t>(bvec.size()), {bvec.data()}};
return proplist.set(pte.proptag, &mv);
}

Expand Down

0 comments on commit 6725a62

Please sign in to comment.