Linux Newbie help
 help / color / mirror / Atom feed
* Build failure with GCC 15 in drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
@ 2024-10-01  6:15 Brahmajit
  2024-10-01  6:18 ` Brahmajit
  0 siblings, 1 reply; 11+ messages in thread
From: Brahmajit @ 2024-10-01  6:15 UTC (permalink / raw)
  To: linux-newbie; +Cc: ville.syrjala

While building the latest stable release with GCC 15 I'm getting an
build error with (I'm guessing) the drm module. This is probably due to
combination of GCC 15's introduction of a new warning
-Wunterminated-string-initialization, -Werror and -Wextra

In the drivers/gpu/drm/display/drm_dp_dual_mode_helper.c file there is a
code section on 163

static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] =
	"DP-HDMI ADAPTOR\x04";

Its from the is_hdmi_adaptor() function.
I read a little about C strings and it seems like we are assigning more
than 16 characters to the array dp_dual_mode_hdmi_id, and
DP_DUAL_MODE_HDMI_ID_LEN is defined as 16.

I'm guessing this has something to do with how termination happens in
char array vs char* and/or null termination

-- 
Regards,
Brahmajit

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-10-01 14:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01  6:15 Build failure with GCC 15 in drivers/gpu/drm/display/drm_dp_dual_mode_helper.c Brahmajit
2024-10-01  6:18 ` Brahmajit
2024-10-01 13:28   ` Ville Syrjälä
2024-10-01 13:48     ` Brahmajit
2024-10-01 14:02       ` Ville Syrjälä
2024-10-01 14:06         ` Brahmajit
2024-10-01 14:12           ` Ville Syrjälä
2024-10-01 14:14             ` Brahmajit
2024-10-01 14:34               ` Brahmajit
2024-10-01 14:36               ` [PATCH 1/1] drm/display: Fix building with GCC 15 Brahmajit Das
2024-10-01 14:10         ` Build failure with GCC 15 in drivers/gpu/drm/display/drm_dp_dual_mode_helper.c Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox