Skip to content

Commit 0a0c308

Browse files
hanbinyoonCQ Bot
authored andcommitted
[aml-sdmmc] Remove -Wno-vla-cxx-extension.
Bug: 42085293 Change-Id: I741af89cedc1dd175a4420f3114b83d6d1d3c90c Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1050605 Commit-Queue: HanBin Yoon <hanbinyoon@google.com> Reviewed-by: Braden Kell <bradenkell@google.com> Reviewed-by: Petr Hosek <phosek@google.com> Reviewed-by: Anirudh Mathukumilli <rudymathu@google.com>
1 parent c627122 commit 0a0c308

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

build/config/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ config("Wno-vla-cxx-extension") {
842842
"//src/developer/memory/metrics/tests:*",
843843
"//src/devices/block/bin/gpt:*",
844844
"//src/devices/block/bin/iochk:*",
845-
"//src/devices/block/drivers/aml-sdmmc:*",
846845
"//src/devices/spi/bin/spiutil:*",
847846
"//src/devices/usb/bin/usbctl:*",
848847
"//src/graphics/display/drivers/amlogic-display:*",

src/devices/block/drivers/aml-sdmmc/BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ fuchsia_cc_driver(
3838
"aml-sdmmc-export.cc",
3939
"aml-sdmmc-regs.h",
4040
],
41-
copts = [
42-
"-Wno-vla-cxx-extension",
43-
],
4441
defines = [
4542
"ZX_ASSERT_LEVEL=2",
4643
"_ALL_SOURCE",

src/devices/block/drivers/aml-sdmmc/BUILD.gn

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ fuchsia_driver("aml-sdmmc-driver") {
6262
configs += [
6363
"//build/config:all_source",
6464
"//build/config/fuchsia:enable_zircon_asserts",
65-
66-
# TODO(https://fxbug.dev/42085293): delete the below and fix compiler warnings
67-
"//build/config:Wno-vla-cxx-extension",
6865
]
6966
sources = [
7067
"aml-sdmmc-with-banjo-export.cc",

src/devices/block/drivers/aml-sdmmc/aml-sdmmc.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,11 @@ class AmlSdmmc : public fdf::DriverBase, public fdf::WireServer<fuchsia_hardware
151151
uint64_t results = 0;
152152

153153
std::string ToString(const uint32_t param_max) const {
154-
char string[param_max + 2];
154+
std::vector<char> string(param_max + 1);
155155
for (uint32_t i = 0; i <= param_max; i++) {
156156
string[i] = (results & (1ULL << i)) ? '|' : '-';
157157
}
158-
string[param_max + 1] = '\0';
159-
return string;
158+
return std::string(string.data(), string.size());
160159
}
161160
};
162161

0 commit comments

Comments
 (0)