summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2019-09-07 09:37:15 +0000
committerMax Krummenacher <max.krummenacher@toradex.com>2019-09-16 13:28:33 +0200
commitd3f76b6ebb8cc19141224a946922958e1c45d25b (patch)
treef6e2e32e18a7091afded0b3715dfa881f830a194
parentf566e754866ff90f33538c31ef8611261180abe1 (diff)
tegra: dc: events.c: fix error about packed
With GCC 9.2.0 we get the following error twice: | events.c:194:36: error: taking address of packed member of 'struct <anonymous>' | may result in an unaligned pointer value [-Werror=address-of-packed-member] | tegra_dc_ext_queue_event(control, &pack.event); | ^~~~~~~~~~~ Demote error to warning. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--drivers/video/tegra/dc/ext/events.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/ext/events.c b/drivers/video/tegra/dc/ext/events.c
index e16a00963e69..fa325b03f2f7 100644
--- a/drivers/video/tegra/dc/ext/events.c
+++ b/drivers/video/tegra/dc/ext/events.c
@@ -191,7 +191,10 @@ int tegra_dc_ext_queue_hotplug(struct tegra_dc_ext_control *control, int output)
pack.hotplug.handle = output;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Waddress-of-packed-member"
tegra_dc_ext_queue_event(control, &pack.event);
+#pragma GCC diagnostic pop
return 0;
}
@@ -222,7 +225,10 @@ int tegra_dc_ext_queue_bandwidth_renegotiate(
pack.bandwidth.handle = output;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Waddress-of-packed-member"
tegra_dc_ext_queue_event(control, &pack.event);
+#pragma GCC diagnostic pop
return 0;
}